Commit bec1277a authored by Jason Yan's avatar Jason Yan Committed by Sam Ravnborg

video: fbdev: valkyriefb.c: fix warning comparing pointer to 0

Fix the following coccicheck warning:

drivers/video/fbdev/valkyriefb.c:348:10-11: WARNING comparing pointer to
0, suggest !E
drivers/video/fbdev/valkyriefb.c:334:12-13: WARNING comparing pointer to
0
drivers/video/fbdev/valkyriefb.c:348:10-11: WARNING comparing pointer to
0
Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200429140942.8137-1-yanaijie@huawei.com
parent c7f66d32
......@@ -331,7 +331,7 @@ int __init valkyriefb_init(void)
struct resource r;
dp = of_find_node_by_name(NULL, "valkyrie");
if (dp == 0)
if (!dp)
return 0;
if (of_address_to_resource(dp, 0, &r)) {
......@@ -345,7 +345,7 @@ int __init valkyriefb_init(void)
#endif /* ppc (!CONFIG_MAC) */
p = kzalloc(sizeof(*p), GFP_ATOMIC);
if (p == 0)
if (!p)
return -ENOMEM;
/* Map in frame buffer and registers */
......
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