kernel_samsung_a53x/drivers/ssb
Rand Deeb 719dbf9039 ssb: Fix division by zero issue in ssb_calc_clock_rate
[ Upstream commit e0b5127fa134fe0284d58877b6b3133939c8b3ce ]

In ssb_calc_clock_rate(), there is a potential issue where the value of
m1 could be zero due to initialization using clkfactor_f6_resolv(). This
situation raised concerns about the possibility of a division by zero
error.

We fixed it by following the suggestions provided by Larry Finger
<Larry.Finger@lwfinger.net> and Michael Büsch <m@bues.ch>. The fix
involves returning a value of 1 instead of 0 in clkfactor_f6_resolv().
This modification ensures the proper functioning of the code and
eliminates the risk of division by zero errors.

Signed-off-by: Rand Deeb <rand.sec96@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Michael Büsch <m@bues.ch>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230904232346.34991-1-rand.sec96@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:20:44 +01:00
..
b43_pci_bridge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bridge_pcmcia_80211.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
driver_chipcommon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
driver_chipcommon_pmu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
driver_chipcommon_sflash.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
driver_extif.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
driver_gige.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
driver_gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
driver_mipscore.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
driver_pcicore.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
embedded.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
host_soc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
main.c ssb: Fix division by zero issue in ssb_calc_clock_rate 2024-11-23 23:20:44 +01:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcihost_wrapper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcmcia.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sdio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sprom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ssb_private.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00