]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
video: smscufx: Deletion of unnecessary checks before the function call "vfree"
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 23 Nov 2014 11:30:33 +0000 (12:30 +0100)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 4 Dec 2014 14:16:01 +0000 (16:16 +0200)
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>
drivers/video/fbdev/smscufx.c

index d513ed6a49f2ec3fdf5b9786879d7f65f8e780c0..9279e5f6696e24ad84ea11a5e3adf7c1980c9a91 100644 (file)
@@ -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);