Browse Source

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>
Markus Elfring 10 years ago
parent
commit
e87d9f295a
1 changed files with 1 additions and 2 deletions
  1. 1 2
      drivers/video/fbdev/uvesafb.c

+ 1 - 2
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;
 }