* [PATCH][next] dma-buf/sw_sync: remove redundant error check on variable err
@ 2025-04-22 22:06 Colin Ian King
0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2025-04-22 22:06 UTC (permalink / raw)
To: Sumit Semwal, Gustavo Padovan, Christian König, linux-media,
dri-devel, linaro-mm-sig
Cc: kernel-janitors, linux-kernel
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@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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-22 22:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-22 22:06 [PATCH][next] dma-buf/sw_sync: remove redundant error check on variable err Colin Ian King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®