[PATCH] dma-fence: Use dma_fence_set_error() internally

Philipp Stanner posted 1 patch 4 days, 16 hours ago
drivers/dma-buf/dma-fence.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] dma-fence: Use dma_fence_set_error() internally
Posted by Philipp Stanner 4 days, 16 hours ago
The dma_fence implementation sets a fence error in dma_fence_release()
manually.

Make the code a bit more readable by using the appropriate API function
for that.

Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
Only compile-tested.
---
 drivers/dma-buf/dma-fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
index c7ea1e75d38a..ae5550cda421 100644
--- a/drivers/dma-buf/dma-fence.c
+++ b/drivers/dma-buf/dma-fence.c
@@ -599,7 +599,7 @@ void dma_fence_release(struct kref *kref)
 		 * so that the callbacks know this signal is due to an error.
 		 */
 		dma_fence_lock_irqsave(fence, flags);
-		fence->error = -EDEADLK;
+		dma_fence_set_error(fence, -EDEADLK);
 		dma_fence_signal_locked(fence);
 		dma_fence_unlock_irqrestore(fence, flags);
 	}
-- 
2.54.0