Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ssb: Fix division by zero issue in ssb_calc_clock_rate
[ Upstream commit e0b5127 ] 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 <[email protected]> and Michael Büsch <[email protected]>. 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 <[email protected]> Acked-by: Larry Finger <[email protected]> Acked-by: Michael Büsch <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sasha Levin <[email protected]>
- Loading branch information