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

From: Dan Carpenter
Date: Wed Mar 06 2013 - 04:27:30 EST


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@xxxxxxxxxxx>
> >
> > 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/