Commit 29924b9f authored by Dan Carpenter's avatar Dan Carpenter Committed by Len Brown

ACPI, APEI, EINJ, cleanup 0 vs NULL confusion

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarHuang Ying <ying.huang@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 4c40aed8
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment