mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 18:24:14 +08: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
@ -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 New Issue
Block a user