GPU-DRM-Exynos: Delete an unnecessary check before the function call "vunmap"
authorMarkus Elfring <[email protected]>
Thu, 21 Jul 2016 17:23:25 +0000 (19:23 +0200)
committerSean Paul <[email protected]>
Thu, 21 Jul 2016 18:06:33 +0000 (14:06 -0400)
The vunmap() 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 <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/exynos/exynos_drm_fbdev.c

index 67dcd6831291fac5f96f26d29ecd9dae8476d8e9..fb49443bfd323be91c91993ad83ef7e053b568d8 100644 (file)
@@ -269,8 +269,7 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev,
        struct exynos_drm_gem *exynos_gem = exynos_fbd->exynos_gem;
        struct drm_framebuffer *fb;
 
-       if (exynos_gem->kvaddr)
-               vunmap(exynos_gem->kvaddr);
+       vunmap(exynos_gem->kvaddr);
 
        /* release drm framebuffer and real buffer */
        if (fb_helper->fb && fb_helper->fb->funcs) {