Re: [PATCH 2.6] Remove NULL client checks in rtc8564 driver

From: Greg KH
Date: Fri Feb 25 2005 - 15:10:52 EST


On Thu, Feb 24, 2005 at 10:49:57PM +0100, Jean Delvare wrote:
> Hi Stefan,
>
> Several functions in your rtc8564 driver verify the non-NULLity of the
> i2c client that is passed to them. It doesn't seem to be necessary, as I
> can't think of any case where these functions could possibly be called
> with a NULL i2c client. As a matter of fact, I couldn't find any similar
> driver doing such checks.
>
> My attention was brought on this by Coverity's SWAT which correctly
> noticed that three of these functions contain explicit or hidden
> dereferences of the i2c client pointer *before* the NULL check. I guess
> it wasn't a problem because the NULL case cannot happen (unless I miss
> something), but this still is confusing code.
>
> Thus I propose the following changes:

Applied, thanks.

greg k-h
-
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/