aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/console/softcursor.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-12-07 12:30:39 -0800
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-12-10 11:33:53 +0200
commita240af2eb24679f4d27d87281b25faee0a25df1a (patch)
treeba95df229a1d2e8721be8e63048bb8c57a58f6b9 /drivers/video/console/softcursor.c
parentdrivers/video: add support for the Solomon SSD1307 OLED Controller (diff)
downloadlinux-dev-a240af2eb24679f4d27d87281b25faee0a25df1a.tar.xz
linux-dev-a240af2eb24679f4d27d87281b25faee0a25df1a.zip
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> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/console/softcursor.c')
-rw-r--r--drivers/video/console/softcursor.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/video/console/softcursor.c b/drivers/video/console/softcursor.c
index 25f835bf3d72..46dd8f5d2e9e 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);