drivers/video/console/softcursor.c: remove redundant NULL check before kfree()
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 7 Dec 2012 20:30:39 +0000 (12:30 -0800)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 10 Dec 2012 09:33:53 +0000 (11:33 +0200)
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>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/console/softcursor.c

index 25f835bf3d72aa2f551eb78ad6c3f1ced7287e67..46dd8f5d2e9e1c899921893f314ce590ea998d10 100644 (file)
@@ -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);