public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] i2c/busses/scx200_acb.c: don't use 0 as NULL pointer
@ 2008-03-30 23:22 Adrian Bunk
  2008-03-31  8:51 ` Jean Delvare
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2008-03-30 23:22 UTC (permalink / raw)
  To: khali-PUYAD+kWke1g9hUCZPvPmw
  Cc: i2c-GZX6beZjE8VD60Wz+7aTrA, linux-kernel-u79uwXL29TY76Z2rM5mHXA

Don't use 0 as NULL pointer.

Spotted by sparse.

Signed-off-by: Adrian Bunk <bunk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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;


_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [2.6 patch] i2c/busses/scx200_acb.c: don't use 0 as NULL pointer
  2008-03-30 23:22 [2.6 patch] i2c/busses/scx200_acb.c: don't use 0 as NULL pointer Adrian Bunk
@ 2008-03-31  8:51 ` Jean Delvare
  0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2008-03-31  8:51 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: i2c, linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-31  8:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-30 23:22 [2.6 patch] i2c/busses/scx200_acb.c: don't use 0 as NULL pointer Adrian Bunk
2008-03-31  8:51 ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox