summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/msm_gem.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_gem.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_gem.c')
-rw-r--r--drivers/gpu/drm/msm/msm_gem.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index 886cfe0383ff..9a713fbb2d01 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -875,8 +875,6 @@ struct drm_gem_object *msm_gem_import(struct drm_device *dev,
return obj;
fail:
- if (obj)
- drm_gem_object_unreference_unlocked(obj);
-
+ drm_gem_object_unreference_unlocked(obj);
return ERR_PTR(ret);
}