[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190215074658.GF2326@kadam>
Date: Fri, 15 Feb 2019 10:46:58 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Chen-Yu Tsai <wens@...e.org>
Cc: Colin King <colin.king@...onical.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
kernel-janitors@...r.kernel.org,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][V2][next] regulator: axp20x: check rdev is null before
dereferencing it
On Tue, Feb 05, 2019 at 11:37:40AM +0800, Chen-Yu Tsai wrote:
> On Sat, Dec 22, 2018 at 7:32 PM Colin King <colin.king@...onical.com> wrote:
> >
> > From: Colin Ian King <colin.king@...onical.com>
> >
> > Currently rdev is dereferenced when assigning desc before rdev is null
> > checked, hence there is a potential null pointer dereference on rdev.
> > Fix this by null checking rdev first.
> >
> > 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>
>
> This patch somehow fell through the cracks. Sorry about that.
>
> Both are really false positives.
I don't like when people use the word "false positive" like this. The
code doesn't checks for NULL after a dereference so that's a nonsense
to do. The correct thing is to remove the NULL check.
regards,
dan carpenter
Powered by blists - more mailing lists