[cocci] [PATCH 19/36] dmaengine: qcom_hidma: remove conditional return with no effect
Sang-Heon Jeon <[email protected]> Fri, 24 Jul 2026 03:45:21 +0900
| Newsgroups | fr.inria.cocci,org.infradead.lists.linux-arm-kernel,org.kernel.vger.dmaengine,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Both branches of the check return the same value, so the check has no effect. Remove it and return the value directly. This is the result of running the Coccinelle script from scripts/coccinelle/misc/cond_return_no_effect.cocci. Signed-off-by: Sang-Heon Jeon <[email protected]> --- drivers/dma/qcom/hidma_ll.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/dma/qcom/hidma_ll.c b/drivers/dma/qcom/hidma_ll.c index 53244e0e34a3..f081aa787f0c 100644 --- a/drivers/dma/qcom/hidma_ll.c +++ b/drivers/dma/qcom/hidma_ll.c @@ -677,11 +677,7 @@ int hidma_ll_setup(struct hidma_lldev *lldev) /* configure interrupts */ hidma_ll_setup_irq(lldev, lldev->msi_support); - rc = hidma_ll_enable(lldev); - if (rc) - return rc; - - return rc; + return hidma_ll_enable(lldev); } void hidma_ll_setup_irq(struct hidma_lldev *lldev, bool msi) -- 2.43.0