Browse Source

drm/udl: Deletion of an unnecessary check before the function call "vunmap"

The vunmap() function performes 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>
Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Markus Elfring 10 years ago
parent
commit
e9196d2385
1 changed files with 1 additions and 2 deletions
  1. 1 2
      drivers/gpu/drm/udl/udl_gem.c

+ 1 - 2
drivers/gpu/drm/udl/udl_gem.c

@@ -184,8 +184,7 @@ void udl_gem_vunmap(struct udl_gem_object *obj)
 		return;
 		return;
 	}
 	}
 
 
-	if (obj->vmapping)
-		vunmap(obj->vmapping);
+	vunmap(obj->vmapping);
 
 
 	udl_gem_put_pages(obj);
 	udl_gem_put_pages(obj);
 }
 }