aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_fb.c
diff options
context:
space:
mode:
authorMarkus Elfring <[email protected]>2016-07-22 06:28:31 +0000
committerDaniel Vetter <[email protected]>2016-07-22 08:27:59 +0000
commit76e4c327ea51d0da47938e343ef27b988bc5c659 (patch)
tree34949cef01cf2edc7f158ea3e34f94caab60aad2 /drivers/gpu/drm/omapdrm/omap_fb.c
parentGPU-DRM-Exynos: Delete an unnecessary check before the function call "vunmap" (diff)
downloadkernel-76e4c327ea51d0da47938e343ef27b988bc5c659.tar.gz
kernel-76e4c327ea51d0da47938e343ef27b988bc5c659.zip
GPU-DRM-OMAP: Delete unnecessary checks before two function calls
The following functions test whether their argument is NULL and then return immediately. * backlight_device_unregister * drm_gem_object_unreference_unlocked Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_fb.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_fb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c
index 983c8cf2441c..31f5178c22c7 100644
--- a/drivers/gpu/drm/omapdrm/omap_fb.c
+++ b/drivers/gpu/drm/omapdrm/omap_fb.c
@@ -115,8 +115,8 @@ static void omap_framebuffer_destroy(struct drm_framebuffer *fb)
for (i = 0; i < n; i++) {
struct plane *plane = &omap_fb->planes[i];
- if (plane->bo)
- drm_gem_object_unreference_unlocked(plane->bo);
+
+ drm_gem_object_unreference_unlocked(plane->bo);
}
kfree(omap_fb);