Re: [PATCH] PM / OPP: Fix NULL pointer dereference when no regulator is defined

From: Rafael J. Wysocki
Date: Thu Feb 11 2016 - 16:17:21 EST


On Thu, Feb 11, 2016 at 5:13 PM, Bartlomiej Zolnierkiewicz
<b.zolnierkie@xxxxxxxxxxx> wrote:
> Commit 7d34d56ef334 ("PM / OPP: Disable OPPs that aren't
> supported by the regulator") causes NULL pointer dereference
> OOPS when no regulator for OPP is defined. Fix it by
> replacing IS_ERR() check with IS_ERR_OR_NULL() one (since
> providing regulator for OPP is optional).
>
> Cc: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
> Cc: Stephen Boyd <sboyd@xxxxxxxxxxxxxx>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> Fixes: 7d34d56ef334 ("PM / OPP: Disable OPPs that aren't supported by the regulator")
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>
> ---
> This fixes linux-pm/linux-next tree boot hang regression on
> Exynos4412 SoC based Odroid-U3 board.
>
> Rafael, please apply. Thank you!

This has been fixed by an identical patch from Jon Hunter I received earlier.

Thanks,
Rafael