[i2c] [2.6 patch] i2c/busses/scx200_acb.c: don't use 0 as NULL pointer

Jean Delvare khali at linux-fr.org
Mon Mar 31 10:51:54 CEST 2008


On Mon, 31 Mar 2008 02:22:28 +0300, Adrian Bunk wrote:
> Don't use 0 as NULL pointer.
> 
> Spotted by sparse.
> 
> Signed-off-by: Adrian Bunk <bunk at kernel.org>
> 
> ---
> 4a2495930cc9bc83f4302de3b73ebf3e8849dc1a diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
> index f5e7a70..61abe0f 100644
> --- a/drivers/i2c/busses/scx200_acb.c
> +++ b/drivers/i2c/busses/scx200_acb.c
> @@ -527,7 +527,7 @@ static int __init scx200_create_isa(const char *text, unsigned long base,
>  	if (iface == NULL)
>  		return -ENOMEM;
>  
> -	if (request_region(base, 8, iface->adapter.name) == 0) {
> +	if (!request_region(base, 8, iface->adapter.name)) {
>  		printk(KERN_ERR NAME ": can't allocate io 0x%lx-0x%lx\n",
>  		       base, base + 8 - 1);
>  		rc = -EBUSY;
> 

Applied, thanks.

-- 
Jean Delvare



More information about the i2c mailing list