dmaengine: sf-pdma:Remove the print function dev_err()
authorye xingchen <ye.xingchen@zte.com.cn>
Wed, 10 Aug 2022 06:25:32 +0000 (06:25 +0000)
committerVinod Koul <vkoul@kernel.org>
Mon, 5 Sep 2022 06:20:38 +0000 (11:50 +0530)
>From the coccinelle check:

./drivers/dma/sf-pdma/sf-pdma.c
Error:line 409 is redundant because platform_get_irq() already prints an
error

./drivers/dma/sf-pdma/sf-pdma.c
Error:line 424 is redundant because platform_get_irq() already prints an
error

So,remove the unnecessary print function dev_err()

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/20220810062532.13425-1-ye.xingchen@zte.com.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sf-pdma/sf-pdma.c

index 4f8b8498c5c62acef1abad81f95c453cb9a4e2fd..6b524eb6bcf3a016d84085248626d21fa8fe7c02 100644 (file)
@@ -405,10 +405,8 @@ static int sf_pdma_irq_init(struct platform_device *pdev, struct sf_pdma *pdma)
                chan = &pdma->chans[i];
 
                irq = platform_get_irq(pdev, i * 2);
-               if (irq < 0) {
-                       dev_err(&pdev->dev, "ch(%d) Can't get done irq.\n", i);
+               if (irq < 0)
                        return -EINVAL;
-               }
 
                r = devm_request_irq(&pdev->dev, irq, sf_pdma_done_isr, 0,
                                     dev_name(&pdev->dev), (void *)chan);
@@ -420,10 +418,8 @@ static int sf_pdma_irq_init(struct platform_device *pdev, struct sf_pdma *pdma)
                chan->txirq = irq;
 
                irq = platform_get_irq(pdev, (i * 2) + 1);
-               if (irq < 0) {
-                       dev_err(&pdev->dev, "ch(%d) Can't get err irq.\n", i);
+               if (irq < 0)
                        return -EINVAL;
-               }
 
                r = devm_request_irq(&pdev->dev, irq, sf_pdma_err_isr, 0,
                                     dev_name(&pdev->dev), (void *)chan);