]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
fbdev: fsl-diu: remove redundant null check on cmap
authorWen Yang <wen.yang99@zte.com.cn>
Thu, 20 Dec 2018 18:13:08 +0000 (19:13 +0100)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Thu, 20 Dec 2018 18:13:08 +0000 (19:13 +0100)
The null check on &info->cmap is redundant since cmap is a struct
inside fb_info and can never be null, so the check is always true.
We may remove it.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Acked-by: Timur Tabi <timur@kernel.org>
Cc: zhong.weidong@zte.com.cn
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/fsl-diu-fb.c

index 332a56b6811f920be0a370b280261d9a02071490..9a5451ba4d44dc289ee1ec1092fc864d5e2a5b7c 100644 (file)
@@ -1575,8 +1575,7 @@ static void uninstall_fb(struct fb_info *info)
 
        unregister_framebuffer(info);
        unmap_video_memory(info);
-       if (&info->cmap)
-               fb_dealloc_cmap(&info->cmap);
+       fb_dealloc_cmap(&info->cmap);
 
        mfbi->registered = 0;
 }