mtd: use NULL instead of 0 for an address

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed Oct 15 23:59:01 PDT 2014


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=9b6e5172e363b0c35a6be4d3197f3bcdc789292e
Commit:     9b6e5172e363b0c35a6be4d3197f3bcdc789292e
Parent:     5828c60826e9422169b3711aa58a583242864cc8
Author:     Martin Kepplinger <martink at posteo.de>
AuthorDate: Thu Jul 31 16:31:16 2014 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Aug 19 11:53:05 2014 -0700

    mtd: use NULL instead of 0 for an address
    
    Use NULL instead of 0 when returning an address. This fixes a
    sparse warning.
    
    Signed-off-by: Martin Kepplinger <martink at posteo.de>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/maps/pcmciamtd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c
index a3cfad3..af747af 100644
--- a/drivers/mtd/maps/pcmciamtd.c
+++ b/drivers/mtd/maps/pcmciamtd.c
@@ -89,7 +89,7 @@ static caddr_t remap_window(struct map_info *map, unsigned long to)
 
 	if (!pcmcia_dev_present(dev->p_dev)) {
 		pr_debug("device removed\n");
-		return 0;
+		return NULL;
 	}
 
 	offset = to & ~(dev->win_size-1);



More information about the linux-mtd-cvs mailing list