From: H Hartley Sweeten Date: Wed, 2 May 2012 23:54:43 +0000 (-0700) Subject: watchdog: sp5100_tco.c: quiet sparse noise about using plain integer was NULL pointer X-Git-Tag: firefly_0821_release~3680^2~2791^2~17 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=62a9aebc5b8e28073a8609b9af6e8321cc622344;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: H Hartley Sweeten Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c index 59108e48ada3..ae5e82cb83fa 100644 --- a/drivers/watchdog/sp5100_tco.c +++ b/drivers/watchdog/sp5100_tco.c @@ -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; }