mirror_ubuntu-kernels/drivers/base/power/opp
Jon Hunter 78ecc56247 PM / OPP: Fix NULL pointer dereference crash when disabling OPPs
Commit 7d34d56ef3 (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: 7d34d56ef3 (PM / OPP: Disable OPPs that aren't supported by the regulator)
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reported-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-02-11 22:05:38 +01:00
..
core.c PM / OPP: Fix NULL pointer dereference crash when disabling OPPs 2016-02-11 22:05:38 +01:00
cpu.c PM / OPP: Set cpu_dev->id in cpumask first 2016-01-02 00:48:11 +01:00
debugfs.c PM / OPP: Add debugfs support 2015-11-23 23:38:23 +01:00
Makefile PM / OPP: Add debugfs support 2015-11-23 23:38:23 +01:00
opp.h PM / OPP: Manage device clk 2016-02-10 01:11:54 +01:00