[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56C1FFE6.1010806@nvidia.com>
Date: Mon, 15 Feb 2016 16:42:14 +0000
From: Jon Hunter <jonathanh@...dia.com>
To: Viresh Kumar <viresh.kumar@...aro.org>,
Rafael Wysocki <rjw@...ysocki.net>,
Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
Stephen Boyd <sboyd@...eaurora.org>
CC: <linaro-kernel@...ts.linaro.org>, <linux-pm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value
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@...dia.com>
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
Tested-by: Jon Hunter <jonathanh@...dia.com>
Thanks
Jon
Powered by blists - more mailing lists