mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
drm/msm: Delete an unnecessary check before drm_gem_object_unreference()
The drm_gem_object_unreference() function tests whether its argument is NULL and then returns immediately. Thus the test around the call 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>
This commit is contained in:
parent
e73a856973
commit
0a677125d0
1 changed files with 1 additions and 3 deletions
|
|
@ -830,9 +830,7 @@ struct drm_gem_object *msm_gem_new(struct drm_device *dev,
|
|||
return obj;
|
||||
|
||||
fail:
|
||||
if (obj)
|
||||
drm_gem_object_unreference(obj);
|
||||
|
||||
drm_gem_object_unreference(obj);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue