Thread (14 messages) flat view 14 messages, 7 authors, 2016-02-16

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

From: Jon Hunter <jonathanh@nvidia.com>
Date: 2016-02-15 16:42:21
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help