]> git.baikalelectronics.ru Git - kernel.git/commit
clk: tegra: bpmp: Don't crash when a clock fails to register
authorMikko Perttunen <mperttunen@nvidia.com>
Fri, 29 Jun 2018 14:38:14 +0000 (17:38 +0300)
committerStephen Boyd <sboyd@kernel.org>
Sun, 8 Jul 2018 23:56:24 +0000 (16:56 -0700)
commit6f65e533ddb20721fe52c1ef5b26b45b3263a828
tree67cc3cbb61c7aa8798db2e9d47331a6bf0cabbbe
parent0d5624e606504772b89d3c3d6b1be740ef176c61
clk: tegra: bpmp: Don't crash when a clock fails to register

When registering clocks, we just skip any that fail to register
(leaving a NULL hole in the clock table). However, our of_xlate
function still tries to dereference each entry while looking for
the clock with the requested id, causing a crash if any clocks
failed to register. Add a check to of_xlate to skip any NULL
clocks.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/tegra/clk-bpmp.c