summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_atomic.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2016-07-20 18:54:32 +0300
committerSean Paul <seanpaul@chromium.org>2016-07-20 20:23:39 +0300
commitf35cbe6a178e94d3fc290f414aa421f81ac76069 (patch)
tree4037f0b7eae01286c55abef5f008685542e98399 /drivers/gpu/drm/drm_atomic.c
parent3694c5c3dea1fc2150f2ec2a036fee298680c0e0 (diff)
downloadlinux-f35cbe6a178e94d3fc290f414aa421f81ac76069.tar.xz
drm/atomic: Delete an unnecessary check before drm_property_unreference_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> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/aa4cd508-38c3-78d7-a9f2-70e3b06a8fb5@users.sourceforge.net
Diffstat (limited to 'drivers/gpu/drm/drm_atomic.c')
-rw-r--r--drivers/gpu/drm/drm_atomic.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 3cee084e9d28..8d2f111fa113 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -404,8 +404,7 @@ drm_atomic_replace_property_blob(struct drm_property_blob **blob,
if (old_blob == new_blob)
return;
- if (old_blob)
- drm_property_unreference_blob(old_blob);
+ drm_property_unreference_blob(old_blob);
if (new_blob)
drm_property_reference_blob(new_blob);
*blob = new_blob;