* [PATCH] watchdog: sp5100_tco.c: quiet sparse noise about using plain integer was NULL pointer
@ 2012-05-02 23:54 H Hartley Sweeten
2012-05-03 11:03 ` Wim Van Sebroeck
0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2012-05-02 23:54 UTC (permalink / raw)
To: Linux Kernel; +Cc: linux-watchdog, wim
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 <hsweeten@visionengravers.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
---
diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
index 59108e4..ae5e82c 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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-03 11:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-02 23:54 [PATCH] watchdog: sp5100_tco.c: quiet sparse noise about using plain integer was NULL pointer H Hartley Sweeten
2012-05-03 11:03 ` Wim Van Sebroeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox