lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 3 Dec 2018 14:43:17 +0800
From:   Wen Yang <wen.yang99@....com.cn>
To:     Timur Tabi <timur@...nel.org>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Cc:     linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, zhong.weidong@....com.cn,
        Wen Yang <wen.yang99@....com.cn>
Subject: [PATCH] fbdev: fsl-diu: remove redundant null check on cmap

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@....com.cn>
CC: Timur Tabi <timur@...nel.org>
CC: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
CC: linux-fbdev@...r.kernel.org
CC: dri-devel@...ts.freedesktop.org
CC: linux-kernel@...r.kernel.org
---
 drivers/video/fbdev/fsl-diu-fb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c
index 332a56b6811f..9a5451ba4d44 100644
--- a/drivers/video/fbdev/fsl-diu-fb.c
+++ b/drivers/video/fbdev/fsl-diu-fb.c
@@ -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;
 }
-- 
2.19.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ