From: Kevin Hao <kexin....@windriver.com>

The fb_info::cmap is a struct instead of pointer, so it makes no sense
to check it before the color map deallocation.

Signed-off-by: Kevin Hao <kexin....@windriver.com>
---
 drivers/video/fbdev/mxc/mxc_ipuv3_fb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/video/fbdev/mxc/mxc_ipuv3_fb.c 
b/drivers/video/fbdev/mxc/mxc_ipuv3_fb.c
index 7e067e2bbd39..0742a81b1dce 100644
--- a/drivers/video/fbdev/mxc/mxc_ipuv3_fb.c
+++ b/drivers/video/fbdev/mxc/mxc_ipuv3_fb.c
@@ -3343,8 +3343,7 @@ static void mxcfb_unsetup_overlay(struct fb_info *fbi_bg)
 
        mxcfb_unregister(ovfbi);
 
-       if (&ovfbi->cmap)
-               fb_dealloc_cmap(&ovfbi->cmap);
+       fb_dealloc_cmap(&ovfbi->cmap);
        framebuffer_release(ovfbi);
 }
 
@@ -3629,8 +3628,7 @@ static int mxcfb_remove(struct platform_device *pdev)
        }
 
        ipu_clear_usage(mxc_fbi->ipu_id, mxc_fbi->ipu_di);
-       if (&fbi->cmap)
-               fb_dealloc_cmap(&fbi->cmap);
+       fb_dealloc_cmap(&fbi->cmap);
        framebuffer_release(fbi);
        return 0;
 }
-- 
2.39.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12761): 
https://lists.yoctoproject.org/g/linux-yocto/message/12761
Mute This Topic: https://lists.yoctoproject.org/mt/99523725/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to