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>
Acked-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
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 */