Skip to contentSkip to conversation

dma-buf/sw_sync: remove redundant error check on variable err

PATCH New Colin Ian King 1 participant 1 message Apr 22, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dma-buf/sw_sync: remove redundant error check on variable err

The variable err is always zero at the point where it is being non-zero checked for an error. The check and error return path are redundant and can be removed. Issue detected by Coverity Scan static analysis.

---
 drivers/dma-buf/sw_sync.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/dma-buf/sw_sync.c +0 -3
index 4f27ee93a00c..ef3fda792749 100644
@@ -437,9 +437,6 @@ static int sw_sync_ioctl_get_deadline(struct sync_timeline *obj, unsigned long a
 
 	dma_fence_put(fence);
 
-	if (ret)
-		return ret;
-
 	if (copy_to_user((void __user *)arg, &data, sizeof(data)))
 		return -EFAULT;
 
Signature · 1 line
2.49.0