diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2016-07-13 19:15:35 +0200 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-07-16 10:29:34 -0400 |
commit | e73a8569731aebd21832b34bf7ce8121dec2e98d (patch) | |
tree | 50baafbc3ede3a81006eb050298ce800944e677e /drivers/gpu/drm/msm/mdp | |
parent | 851dd75d64dbfc9a97d5109659e82e95d6bbe5bf (diff) | |
download | linux-e73a8569731aebd21832b34bf7ce8121dec2e98d.tar.gz linux-e73a8569731aebd21832b34bf7ce8121dec2e98d.tar.bz2 linux-e73a8569731aebd21832b34bf7ce8121dec2e98d.zip |
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/mdp')
-rw-r--r-- | drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c index ba8df15605d7..7b39e89fbc2b 100644 --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c @@ -168,8 +168,7 @@ static void mdp4_destroy(struct msm_kms *kms) if (mdp4_kms->blank_cursor_iova) msm_gem_put_iova(mdp4_kms->blank_cursor_bo, mdp4_kms->id); - if (mdp4_kms->blank_cursor_bo) - drm_gem_object_unreference_unlocked(mdp4_kms->blank_cursor_bo); + drm_gem_object_unreference_unlocked(mdp4_kms->blank_cursor_bo); if (mdp4_kms->rpm_enabled) pm_runtime_disable(dev); |