Re: [PATCH] iio: adc: exynos5_adc: fix compilation warnings

Dan Carpenter
2013-03-06T09:27:14Z

On Wed, Mar 06, 2013 at 09:44:47AM +0100, Lars-Peter Clausen wrote:
> On 03/06/2013 05:11 AM, Naveen Krishna Chatradhi wrote:
> > From: Naveen Krishna Ch <ch.naveen@samsung.com>
> >
> > Fixes the compilation warnings and potential NULL pointer
> > dereferencing pointed out by "Dan Carpenter".
> >
>
> I'd say that's a rather un-potential NULL pointer dereferencing, but if it
> makes the static checkers happy, why not. Since the same match table is used to
> match the device, probe won't be called unless there is a match, so
> of_match_node() will never return NULL in this case.
>

Actually the reason Smatch complains is because this was built with
CONFIG_OF=n. Probably it should depend on that in the Kconfig file?

The static checker warnings are a semi automatic thing and we only
send the one email and then mark them as looked at. It's not worth
silencing false positives unless it makes the code easier to
audit.

regards,
dan carpenter