Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value

Jon Hunter
2016-02-15T16:42:14Z

On 15/02/16 16:26, Viresh Kumar wrote:
> We are currently required to do two checks for regulator pointer:
> IS_ERR() and IS_NULL().
>
> And multiple instances are reported, about both of these not being used
> consistently and so resulting in crashes.
>
> Fix that by initializing regulator pointer with an error value and
> checking it only against an error.
>
> This makes code consistent and efficient.
>
> Reported-by: Jon Hunter <jonathanh@nvidia.com>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Tested-by: Jon Hunter <jonathanh@nvidia.com>

Thanks
Jon