[PATCH][next] dma-buf/sw_sync: remove redundant error check on variable err
Colin Ian King
colin.i.king at gmail.com
Tue Apr 22 22:06:27 UTC 2025
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.
Signed-off-by: Colin Ian King <colin.i.king at gmail.com>
---
drivers/dma-buf/sw_sync.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/dma-buf/sw_sync.c b/drivers/dma-buf/sw_sync.c
index 4f27ee93a00c..ef3fda792749 100644
--- a/drivers/dma-buf/sw_sync.c
+++ b/drivers/dma-buf/sw_sync.c
@@ -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;
--
2.49.0
More information about the dri-devel
mailing list