From: Sachin Kamat Date: Fri, 7 Dec 2012 20:30:39 +0000 (-0800) Subject: drivers/video/console/softcursor.c: remove redundant NULL check before kfree() X-Git-Tag: upstream/snapshot3+hdmi~6053^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a240af2eb24679f4d27d87281b25faee0a25df1a;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git drivers/video/console/softcursor.c: remove redundant NULL check before kfree() Signed-off-by: Sachin Kamat Cc: Florian Tobias Schandinat Cc: Tomi Valkeinen Signed-off-by: Andrew Morton Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/video/console/softcursor.c b/drivers/video/console/softcursor.c index 25f835b..46dd8f5 100644 --- a/drivers/video/console/softcursor.c +++ b/drivers/video/console/softcursor.c @@ -35,8 +35,7 @@ int soft_cursor(struct fb_info *info, struct fb_cursor *cursor) 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);