[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190218081217.GA17104@kadam>
Date: Mon, 18 Feb 2019 11:12:17 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Colin King <colin.king@...onical.com>
Cc: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][V3] regulator: axp20x: remove a redundant null check on
rdev
On Fri, Feb 15, 2019 at 09:45:54AM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> Currently rdev is dereferenced when assigning desc before rdev is null
> checked, this is leading to static analysis warnings. However, rdev
> can never be null, so the null check is redundant and can be removed.
>
> Detected by CoverityScan, CID#1476031 ("Dereference before null check")
>
> Fixes: 77e3e3b165db ("regulator: axp20x: add software based soft_start for AXP209 LDO3")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
>
> --
We need a third '-' character on the cut off marker.
>
> V2: Fix 2nd occurrance of this thinko
> V3: Remove null check, Dan Carpenter noted that rdev can never be null.
> ---
regards,
dan carpenter
Powered by blists - more mailing lists