Skip to content

Commit

Permalink
drivers/video/console/softcursor.c: remove redundant NULL check befor…
Browse files Browse the repository at this point in the history
…e 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>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Sachin Kamat authored and Tomi Valkeinen committed Dec 10, 2012
1 parent a2ed00d commit a240af2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/video/console/softcursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a240af2

Please sign in to comment.