Skip to contentSkip to conversation

dma-fence: Use dma_fence_set_error() internally

PATCH New Philipp Stanner 1 participant 1 message Jun 3

Subsystems (3)
lore
Share & tools
lore

Philipp Stanner

author maintainer
#0 lore raw

PATCH 1/1 dma-fence: Use dma_fence_set_error() internally

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.

---
Only compile-tested.

---
 drivers/dma-buf/dma-fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma-buf/dma-fence.c +1 -1
index c7ea1e75d38a..ae5550cda421 100644
@@ -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);
 	}
Signature · 1 line
2.54.0