[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1557483927.7859.3.camel@pengutronix.de>
Date: Fri, 10 May 2019 12:25:27 +0200
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Bartosz Golaszewski <bgolaszewski@...libre.com>,
Colin King <colin.king@...onical.com>
Cc: kernel-janitors@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][V2] reset: remove redundant null check on pointer dev
On Fri, 2019-05-10 at 12:14 +0200, Bartosz Golaszewski wrote:
> pt., 10 maj 2019 o 11:58 Colin King <colin.king@...onical.com> napisaĆ(a):
> >
> > From: Colin Ian King <colin.king@...onical.com>
> >
> > Pointer dev is being dereferenced when passed to the inlined
> > functon dev_name, however, dev is later being null checked
> > so at first this seems like a potential null pointer dereference.
> >
> > In fact, _reset_control_get_from_lookup is only ever called from
> > __reset_control_get, right after checking dev->of_node hence
> > dev can never be null. Clean this up by removing the redundant
> > null check.
> >
> > Thanks to Philipp Zabel for spotting that dev can never be null.
> >
> > Addresses-Coverity: ("Dereference before null check")
> > Fixes: 6691dffab0ab ("reset: add support for non-DT systems")
> > Signed-off-by: Colin Ian King <colin.king@...onical.com>
[...]
> Reviewed-by: Bartosz Golaszewski <bgolaszewski@...libre.com>
Thank you both, applied to reset/fixes.
regards
Philipp
Powered by blists - more mailing lists