mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 17:41:22 +00:00
f4392d6da5
It is possible for the public functions, tegra_io_rail_power_on/off() to be called before the PMC device has been probed. If this happens then the pmc->clk member will not be initialised and the call to clk_get_rate() in tegra_io_rail_prepare() will return zero and lead to a divide-by-zero exception. The function clk_get_rate() will return zero if a NULl clk pointer is passed. Therefore, rather that checking if pmc->clk is initialised, fix this by checking the return value for clk_get_rate() to make sure it is not zero. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com> |
||
---|---|---|
.. | ||
bcm | ||
dove | ||
fsl | ||
mediatek | ||
qcom | ||
renesas | ||
rockchip | ||
samsung | ||
sunxi | ||
tegra | ||
ti | ||
ux500 | ||
versatile | ||
Kconfig | ||
Makefile |