瀏覽代碼

i2c/scx200_acb: Don't use 0 as NULL pointer

Don't use 0 as NULL pointer.

Spotted by sparse.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Adrian Bunk 17 年之前
父節點
當前提交
dec1a998bd
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/i2c/busses/scx200_acb.c

+ 1 - 1
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;