linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] ACPI, APEI, EINJ, cleanup 0 vs NULL confusion
@ 2012-01-20  7:57 Dan Carpenter
  2012-01-21  0:12 ` Huang Ying
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-01-20  7:57 UTC (permalink / raw)
  To: Len Brown; +Cc: Huang Ying, Tony Luck, linux-acpi, kernel-janitors

This function is returning pointers.  Sparse complains here:
drivers/acpi/apei/einj.c:262:32: warning:
	Using plain integer as NULL pointer

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
index bb20b03..c89b0e5 100644
--- a/drivers/acpi/apei/einj.c
+++ b/drivers/acpi/apei/einj.c
@@ -259,15 +259,15 @@ static void *einj_get_parameter_address(void)
 
 		v4param = ioremap(paddrv4, sizeof(*v4param));
 		if (!v4param)
-			return 0;
+			return NULL;
 		if (readq(&v4param->reserved1) || readq(&v4param->reserved2)) {
 			iounmap(v4param);
-			return 0;
+			return NULL;
 		}
 		return v4param;
 	}
 
-	return 0;
+	return NULL;
 }
 
 /* do sanity check to trigger table */

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

end of thread, other threads:[~2012-01-21  0:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-20  7:57 [patch] ACPI, APEI, EINJ, cleanup 0 vs NULL confusion Dan Carpenter
2012-01-21  0:12 ` Huang Ying

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).