From: Dave Jones Date: Mon, 9 Apr 2007 06:20:34 +0000 (-0400) Subject: [AGPGART] Fix sparse warning in sgi-agp.c X-Git-Tag: firefly_0821_release~30234^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b826b4d6e497f862239c16b25fe864026858aad5;p=firefly-linux-kernel-4.4.55.git [AGPGART] Fix sparse warning in sgi-agp.c drivers/char/agp/sgi-agp.c:51:10: warning: Using plain integer as NULL pointer Signed-off-by: Dave Jones --- diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c index ee8f50edde1b..cda608c42bea 100644 --- a/drivers/char/agp/sgi-agp.c +++ b/drivers/char/agp/sgi-agp.c @@ -47,9 +47,8 @@ static void *sgi_tioca_alloc_page(struct agp_bridge_data *bridge) nid = info->ca_closest_node; page = alloc_pages_node(nid, GFP_KERNEL, 0); - if (page == NULL) { - return 0; - } + if (!page) + return NULL; get_page(page); SetPageLocked(page);