diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-11-23 12:30:33 +0100 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-12-04 16:16:01 +0200 |
commit | 2daff4d48d7e9acde58a68de3cd11f8215780499 (patch) | |
tree | 70c0994fe0b31e613d1f5414b035ef8c2b685f30 /drivers | |
parent | 177c0386ea5beb5b8c73d7dbde41487f3f4eabf4 (diff) |
video: smscufx: Deletion of unnecessary checks before the function call "vfree"
The vfree() function performs also input parameter validation. Thus the test
around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/fbdev/smscufx.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/fbdev/smscufx.c b/drivers/video/fbdev/smscufx.c index d513ed6a49f2..9279e5f6696e 100644 --- a/drivers/video/fbdev/smscufx.c +++ b/drivers/video/fbdev/smscufx.c @@ -1142,8 +1142,7 @@ static void ufx_free_framebuffer_work(struct work_struct *work) fb_dealloc_cmap(&info->cmap); if (info->monspecs.modedb) fb_destroy_modedb(info->monspecs.modedb); - if (info->screen_base) - vfree(info->screen_base); + vfree(info->screen_base); fb_destroy_modelist(&info->modelist); @@ -1743,8 +1742,7 @@ error: fb_dealloc_cmap(&info->cmap); if (info->monspecs.modedb) fb_destroy_modedb(info->monspecs.modedb); - if (info->screen_base) - vfree(info->screen_base); + vfree(info->screen_base); fb_destroy_modelist(&info->modelist); |