diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-09-25 16:59:54 +0530 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-09-26 11:50:08 +0300 |
commit | b1dfee60c8eb35ba74f94d493864f3a55836b603 (patch) | |
tree | 8277c2f106a2a2b7c087b71167bb1eb8cbd6697b /drivers/video/uvesafb.c | |
parent | a13afa4923a02499ff6295dcf5ef700e4baa755a (diff) | |
download | op-kernel-dev-b1dfee60c8eb35ba74f94d493864f3a55836b603.zip op-kernel-dev-b1dfee60c8eb35ba74f94d493864f3a55836b603.tar.gz |
video: uvesafb: Remove redundant NULL check
kfree on a NULL pointer is a no-op.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Michal Januszewski <spock@gentoo.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/uvesafb.c')
-rw-r--r-- | drivers/video/uvesafb.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c index 7aec6f3..676a4b9 100644 --- a/drivers/video/uvesafb.c +++ b/drivers/video/uvesafb.c @@ -233,8 +233,7 @@ out: static void uvesafb_free(struct uvesafb_ktask *task) { if (task) { - if (task->done) - kfree(task->done); + kfree(task->done); kfree(task); } } @@ -1332,8 +1331,8 @@ setmode: FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR; info->fix.line_length = mode->bytes_per_scan_line; -out: if (crtc != NULL) - kfree(crtc); +out: + kfree(crtc); uvesafb_free(task); return err; @@ -1793,8 +1792,7 @@ out_mode: fb_destroy_modedb(info->monspecs.modedb); fb_dealloc_cmap(&info->cmap); out: - if (par->vbe_modes) - kfree(par->vbe_modes); + kfree(par->vbe_modes); framebuffer_release(info); return err; @@ -1817,12 +1815,9 @@ static int uvesafb_remove(struct platform_device *dev) fb_dealloc_cmap(&info->cmap); if (par) { - if (par->vbe_modes) - kfree(par->vbe_modes); - if (par->vbe_state_orig) - kfree(par->vbe_state_orig); - if (par->vbe_state_saved) - kfree(par->vbe_state_saved); + kfree(par->vbe_modes); + kfree(par->vbe_state_orig); + kfree(par->vbe_state_saved); } framebuffer_release(info); |