Skip to contentSkip to conversation

watchdog: sp5100_tco.c: quiet sparse noise about using plain integer was NULL pointer

PATCH In review H Hartley Sweeten 2 participants 2 messages May 2, 2012 – May 3, 2012 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: sp5100_tco.c: quiet sparse noise about using plain integer was NULL pointer

Pointers should not be compared to plain integers. Quiets the sparse warning:
warning: Using plain integer as NULL pointer

---

drivers/watchdog/sp5100_tco.c +1 -1
index 59108e4..ae5e82c 100644
@@ -313,7 +313,7 @@ static unsigned char __devinit sp5100_tco_setupdevice(void)
 	tcobase_phys = val;
 
 	tcobase = ioremap(val, SP5100_WDT_MEM_MAP_SIZE);
-	if (tcobase == 0) {
+	if (!tcobase) {
 		pr_err("failed to get tcobase address\n");
 		goto unreg_mem_region;
 	}