]> git.baikalelectronics.ru Git - kernel.git/commit
PM / devfreq: rk3399_dmc: Fix kernel oops when rockchip,pmu is absent
authorMarc Zyngier <maz@kernel.org>
Tue, 30 Jun 2020 10:05:46 +0000 (11:05 +0100)
committerChanwoo Choi <cw00.choi@samsung.com>
Thu, 30 Jul 2020 08:22:57 +0000 (17:22 +0900)
commita43a1f2c0e985658970db9506d8cfbcd9eb42762
tree3602a3ad48d4107531e4df228abcc05f0c9f1ad5
parentcd194de09f766ecaa52d957318a77257f18d3584
PM / devfreq: rk3399_dmc: Fix kernel oops when rockchip,pmu is absent

Booting a recent kernel on a rk3399-based system (nanopc-t4),
equipped with a recent u-boot and ATF results in an Oops due
to a NULL pointer dereference.

This turns out to be due to the rk3399-dmc driver looking for
an *undocumented* property (rockchip,pmu), and happily using
a NULL pointer when the property isn't there.

Instead, make most of what was brought in with d3b5a4c0f019
("PM / devfreq: rk3399_dmc: Pass ODT and auto power down parameters
to TF-A.") conditioned on finding this property in the device-tree,
preventing the driver from exploding.

Cc: stable@vger.kernel.org
Fixes: d3b5a4c0f019 ("PM / devfreq: rk3399_dmc: Pass ODT and auto power down parameters to TF-A.")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/devfreq/rk3399_dmc.c