summaryrefslogtreecommitdiffstats
path: root/drivers/dma-buf
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-08-07 23:32:21 +0200
committerAlex Deucher <alexander.deucher@amd.com>2017-08-09 21:01:32 +0200
commitf3e31b73a54229a39db29345347b8f96d6cd312e (patch)
tree4a542d7be32ea4886a35ced54e483a102f319711 /drivers/dma-buf
parentdrm: make drm_mode_config_func const (diff)
downloadlinux-f3e31b73a54229a39db29345347b8f96d6cd312e.tar.xz
linux-f3e31b73a54229a39db29345347b8f96d6cd312e.zip
dma-buf: dma_fence_put is NULL safe
No need to check. Acked-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/1502141543-13455-2-git-send-email-alexander.deucher@amd.com
Diffstat (limited to 'drivers/dma-buf')
-rw-r--r--drivers/dma-buf/reservation.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c
index 393817e849ed..87f8f5747500 100644
--- a/drivers/dma-buf/reservation.c
+++ b/drivers/dma-buf/reservation.c
@@ -195,8 +195,7 @@ done:
if (old)
kfree_rcu(old, rcu);
- if (old_fence)
- dma_fence_put(old_fence);
+ dma_fence_put(old_fence);
}
/**
@@ -258,8 +257,7 @@ void reservation_object_add_excl_fence(struct reservation_object *obj,
dma_fence_put(rcu_dereference_protected(old->shared[i],
reservation_object_held(obj)));
- if (old_fence)
- dma_fence_put(old_fence);
+ dma_fence_put(old_fence);
}
EXPORT_SYMBOL(reservation_object_add_excl_fence);