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:
Markus Elfring 2016-07-13 19:29:19 +02:00 committed by Rob Clark
parent e73a856973
commit 0a677125d0

View File

@ -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);
}