Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [patch 2/2] drivers/video/console/softcursor.c: remove redundant NULL check before kfree()
@ 2012-12-07 20:30 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2012-12-07 20:30 UTC (permalink / raw)
  To: linux-fbdev

From: Sachin Kamat <sachin.kamat@linaro.org>
Subject: drivers/video/console/softcursor.c: remove redundant NULL check before kfree()

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/video/console/softcursor.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff -puN drivers/video/console/softcursor.c~drivers-video-console-softcursorc-remove-redundant-null-check-before-kfree drivers/video/console/softcursor.c
--- a/drivers/video/console/softcursor.c~drivers-video-console-softcursorc-remove-redundant-null-check-before-kfree
+++ a/drivers/video/console/softcursor.c
@@ -35,8 +35,7 @@ int soft_cursor(struct fb_info *info, st
 	dsize = s_pitch * cursor->image.height;
 
 	if (dsize + sizeof(struct fb_image) != ops->cursor_size) {
-		if (ops->cursor_src != NULL)
-			kfree(ops->cursor_src);
+		kfree(ops->cursor_src);
 		ops->cursor_size = dsize + sizeof(struct fb_image);
 
 		ops->cursor_src = kmalloc(ops->cursor_size, GFP_ATOMIC);
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-12-07 20:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-07 20:30 [patch 2/2] drivers/video/console/softcursor.c: remove redundant NULL check before kfree() akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox