• Marc Zyngier's avatar
    PM / devfreq: rk3399_dmc: Fix kernel oops when rockchip,pmu is absent · 63ef91f2
    Marc Zyngier authored
    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 9173c5ce
    ("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: 9173c5ce ("PM / devfreq: rk3399_dmc: Pass ODT and auto power down parameters to TF-A.")
    Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
    Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
    63ef91f2
rk3399_dmc.c 14.3 KB