]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
GPU-DRM: Delete an unnecessary check before drm_property_unreference_blob()
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 5 Jul 2015 19:55:10 +0000 (21:55 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 6 Jul 2015 06:53:19 +0000 (08:53 +0200)
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>
drivers/gpu/drm/drm_crtc.c

index b69ed97d447c9346d4c90b615c7943f06e18bae9..79fe31e5851e86ab9588a2bb3d6d63c23a4e6191 100644 (file)
@@ -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;