Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Markus Elfring and committed by
Tomi Valkeinen
2daff4d4 177c0386

+2 -4
+2 -4
drivers/video/fbdev/smscufx.c
··· 1142 1142 fb_dealloc_cmap(&info->cmap); 1143 1143 if (info->monspecs.modedb) 1144 1144 fb_destroy_modedb(info->monspecs.modedb); 1145 - if (info->screen_base) 1146 - vfree(info->screen_base); 1145 + vfree(info->screen_base); 1147 1146 1148 1147 fb_destroy_modelist(&info->modelist); 1149 1148 ··· 1742 1743 fb_dealloc_cmap(&info->cmap); 1743 1744 if (info->monspecs.modedb) 1744 1745 fb_destroy_modedb(info->monspecs.modedb); 1745 - if (info->screen_base) 1746 - vfree(info->screen_base); 1746 + vfree(info->screen_base); 1747 1747 1748 1748 fb_destroy_modelist(&info->modelist); 1749 1749