summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/msm_fb.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2016-07-13 20:15:35 +0300
committerRob Clark <robdclark@gmail.com>2016-07-16 17:29:34 +0300
commite73a8569731aebd21832b34bf7ce8121dec2e98d (patch)
tree50baafbc3ede3a81006eb050298ce800944e677e /drivers/gpu/drm/msm/msm_fb.c
parent851dd75d64dbfc9a97d5109659e82e95d6bbe5bf (diff)
downloadlinux-e73a8569731aebd21832b34bf7ce8121dec2e98d.tar.xz
drm/msm: Delete unnecessary checks before drm_gem_object_unreference_unlocked()
The drm_gem_object_unreference_unlocked() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_fb.c')
-rw-r--r--drivers/gpu/drm/msm/msm_fb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/msm_fb.c b/drivers/gpu/drm/msm/msm_fb.c
index 7919c24c6ddd..95cf8fe72ee5 100644
--- a/drivers/gpu/drm/msm/msm_fb.c
+++ b/drivers/gpu/drm/msm/msm_fb.c
@@ -49,8 +49,8 @@ static void msm_framebuffer_destroy(struct drm_framebuffer *fb)
for (i = 0; i < n; i++) {
struct drm_gem_object *bo = msm_fb->planes[i];
- if (bo)
- drm_gem_object_unreference_unlocked(bo);
+
+ drm_gem_object_unreference_unlocked(bo);
}
kfree(msm_fb);