summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2014-11-23 13:00:26 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-12-04 17:16:01 +0300
commite87d9f295a7f3e9e7aae7a64f8fa9b45ceb1bf1c (patch)
treeaab6f7524472ead6bea65aed7761660d58519842 /drivers/video
parentf858275869af5f2be58782cfaffcf56944bbfe39 (diff)
downloadlinux-e87d9f295a7f3e9e7aae7a64f8fa9b45ceb1bf1c.tar.xz
video: uvesafb: Deletion of an unnecessary check before the function call "uvesafb_free"
The uvesafb_free() function tests whether its argument is NULL and then returns immediately. 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/video')
-rw-r--r--drivers/video/fbdev/uvesafb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c
index 509d452e8f91..f718627b368f 100644
--- a/drivers/video/fbdev/uvesafb.c
+++ b/drivers/video/fbdev/uvesafb.c
@@ -1219,8 +1219,7 @@ static int uvesafb_release(struct fb_info *info, int user)
uvesafb_vbe_state_restore(par, par->vbe_state_orig);
out:
atomic_dec(&par->ref_count);
- if (task)
- uvesafb_free(task);
+ uvesafb_free(task);
return 0;
}