video: fbdev: offb: fix warning comparing pointer to 0
authorHaowen Bai <baihaowen@meizu.com>
Fri, 11 Mar 2022 02:56:48 +0000 (10:56 +0800)
committerHelge Deller <deller@gmx.de>
Fri, 11 Mar 2022 07:23:53 +0000 (08:23 +0100)
Fix the following coccicheck warning:
drivers/video/fbdev/offb.c:415:13-14: WARNING comparing pointer to 0

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/offb.c

index 4501e84..afdb6aa 100644 (file)
@@ -412,7 +412,7 @@ static void __init offb_init_fb(const char *name,
 
        info = framebuffer_alloc(sizeof(u32) * 16, NULL);
 
-       if (info == 0) {
+       if (!info) {
                release_mem_region(res_start, res_size);
                return;
        }