From: Christian König Date: Mon, 7 Aug 2017 21:32:21 +0000 (-0400) Subject: dma-buf: dma_fence_put is NULL safe X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f3e31b73a54229a39db29345347b8f96d6cd312e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git dma-buf: dma_fence_put is NULL safe No need to check. Acked-by: Sumit Semwal Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/1502141543-13455-2-git-send-email-alexander.deucher@amd.com --- 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);