Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed343155 authored by Jon Hunter's avatar Jon Hunter Committed by Alex Shi
Browse files

PM / OPP: Fix NULL pointer dereference crash when disabling OPPs



Commit 7d34d56ef334 (PM / OPP: Disable OPPs that aren't supported by
the regulator) causes a crash to happen on Tegra124 Jetson TK1 when
using the DFLL clock source for the CPU.  The DFLL manages the voltage
itself and so there is no regulator specified for the OPPs and so we
get a crash when we try to dereference the regulator pointer.  Fix
this by checking to see if the regulator IS_ERR_OR_NULL before
dereferencing it.

Fixes: 7d34d56ef334 (PM / OPP: Disable OPPs that aren't supported by the regulator)
Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
Reported-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
[ rjw: Changelog ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>

(cherry picked from commit 78ecc56247f0ec2bc0cf6f2f2af69e98d99767bc)
Signed-off-by: default avatarAlex Shi <alex.shi@linaro.org>
parent 6229dc0d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment