powerpc/85xx: Fix oops when mpc85xx_smp_guts_ids node cannot be found
authorXiaoming Ni <nixiaoming@huawei.com>
Wed, 29 Sep 2021 03:36:45 +0000 (11:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 13:03:48 +0000 (14:03 +0100)
commit93fccb1f8939ef5328a674a2301286a0d0a77bfa
treea189dcb065823c27bd106c610bd662fbb955a4cf
parent875609ad8020a818ec25244fa0915e04e2cf4bf5
powerpc/85xx: Fix oops when mpc85xx_smp_guts_ids node cannot be found

commit 3c2172c1c47b4079c29f0e6637d764a99355ebcd upstream.

When the field described in mpc85xx_smp_guts_ids[] is not configured in
dtb, the mpc85xx_setup_pmc() does not assign a value to the "guts"
variable. As a result, the oops is triggered when
mpc85xx_freeze_time_base() is executed.

Fixes: 56f1ba280719 ("powerpc/mpc85xx: refactor the PM operations")
Cc: stable@vger.kernel.org # v4.6+
Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210929033646.39630-2-nixiaoming@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/platforms/85xx/mpc85xx_pm_ops.c