linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fbdev: fsl-diu: remove redundant null check on cmap
@ 2018-12-03  6:43 Wen Yang
  2018-12-03 14:53 ` Timur Tabi
  0 siblings, 1 reply; 3+ messages in thread
From: Wen Yang @ 2018-12-03  6:43 UTC (permalink / raw)
  To: Timur Tabi, Bartlomiej Zolnierkiewicz
  Cc: linux-fbdev, dri-devel, linux-kernel, zhong.weidong, Wen Yang

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>
CC: Timur Tabi <timur@kernel.org>
CC: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
CC: linux-fbdev@vger.kernel.org
CC: dri-devel@lists.freedesktop.org
CC: linux-kernel@vger.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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fbdev: fsl-diu: remove redundant null check on cmap
  2018-12-03  6:43 [PATCH] fbdev: fsl-diu: remove redundant null check on cmap Wen Yang
@ 2018-12-03 14:53 ` Timur Tabi
  2018-12-20 17:58   ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 3+ messages in thread
From: Timur Tabi @ 2018-12-03 14:53 UTC (permalink / raw)
  To: Wen Yang, Bartlomiej Zolnierkiewicz
  Cc: linux-fbdev, dri-devel, linux-kernel, zhong.weidong

On 12/3/18 12:43 AM, Wen Yang wrote:
> 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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fbdev: fsl-diu: remove redundant null check on cmap
  2018-12-03 14:53 ` Timur Tabi
@ 2018-12-20 17:58   ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-12-20 17:58 UTC (permalink / raw)
  To: Timur Tabi, Wen Yang; +Cc: linux-fbdev, dri-devel, linux-kernel, zhong.weidong


On 12/03/2018 03:53 PM, Timur Tabi wrote:
> On 12/3/18 12:43 AM, Wen Yang wrote:
>> 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>

Patch queued for 4.21, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-20 17:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-03  6:43 [PATCH] fbdev: fsl-diu: remove redundant null check on cmap Wen Yang
2018-12-03 14:53 ` Timur Tabi
2018-12-20 17:58   ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).