Skip to content

Commit

Permalink
powerpc/85xx: Fix oops when mpc85xx_smp_guts_ids node cannot be found
Browse files Browse the repository at this point in the history
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: 56f1ba2 ("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
  • Loading branch information
Xiaoming Ni authored and Michael Ellerman committed Oct 8, 2021
1 parent 3872731 commit 3c2172c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/powerpc/platforms/85xx/mpc85xx_pm_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ int __init mpc85xx_setup_pmc(void)
pr_err("Could not map guts node address\n");
return -ENOMEM;
}
qoriq_pm_ops = &mpc85xx_pm_ops;
}

qoriq_pm_ops = &mpc85xx_pm_ops;

return 0;
}

0 comments on commit 3c2172c

Please sign in to comment.