diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2024-06-06 16:23:44 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-06-09 18:35:21 +0200 |
commit | 28f961f9d5b7c3d9b9f93cc59e54477ba1278cf9 (patch) | |
tree | f75df44f030b5ab18e0a7139aadf2b4fc47d2be0 /drivers/dma/ti | |
parent | tools: ynl: make user space policies const (diff) | |
download | linux-28f961f9d5b7c3d9b9f93cc59e54477ba1278cf9.tar.xz linux-28f961f9d5b7c3d9b9f93cc59e54477ba1278cf9.zip |
dmaengine: ti: k3-udma-glue: clean up return in k3_udma_glue_rx_get_irq()
Currently the k3_udma_glue_rx_get_irq() function returns either negative
error codes or zero on error. Generally, in the kernel, zero means
success so this be confusing and has caused bugs in the past. Also the
"tx" version of this function only returns negative error codes. Let's
clean this "rx" function so both functions match.
This patch has no effect on runtime.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/dma/ti')
-rw-r--r-- | drivers/dma/ti/k3-udma-glue.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/dma/ti/k3-udma-glue.c b/drivers/dma/ti/k3-udma-glue.c index c9b93055dc9d..b96b448a0e69 100644 --- a/drivers/dma/ti/k3-udma-glue.c +++ b/drivers/dma/ti/k3-udma-glue.c @@ -1531,6 +1531,9 @@ int k3_udma_glue_rx_get_irq(struct k3_udma_glue_rx_channel *rx_chn, flow->virq = k3_ringacc_get_ring_irq_num(flow->ringrx); } + if (!flow->virq) + return -ENXIO; + return flow->virq; } EXPORT_SYMBOL_GPL(k3_udma_glue_rx_get_irq); |