Re: [PATCH v2] regulator: wm831x-dcdc: Use pointer after NULL check

From: Mark Brown
Date: Thu Jul 02 2015 - 07:15:19 EST


On Thu, Jul 02, 2015 at 11:18:49AM +0100, Charles Keepax wrote:
> On Thu, Jul 02, 2015 at 01:27:09PM +0530, Maninder Singh wrote:
> > pdata is used before NULL check, so it looks misleading.

> The patch basically looks fine, but it feels a bit like needless
> churn. The current code is perfectly correct and feels clear
> enough to me.

It's a bug - either the validation shouldn't be there or it needs to be
before the use otherwise it does nothing.

Attachment: signature.asc
Description: Digital signature