Skip to content

Commit

Permalink
GPU-DRM: Delete an unnecessary check before drm_property_unreference_…
Browse files Browse the repository at this point in the history
…blob()

The drm_property_unreference_blob() 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>
Reviewed-by: Zhao Junwang <zhjwpku@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Markus Elfring authored and Daniel Vetter committed Jul 6, 2015
1 parent a3d1d00 commit ec53082
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4469,9 +4469,7 @@ static int drm_property_replace_global_blob(struct drm_device *dev,
goto err_created;
}

if (old_blob)
drm_property_unreference_blob(old_blob);

drm_property_unreference_blob(old_blob);
*replace = new_blob;

return 0;
Expand Down

0 comments on commit ec53082

Please sign in to comment.