ethernet: 8390: Remove unnecessary print function dev_err()
authorYang Li <yang.lee@linux.alibaba.com>
Fri, 11 Mar 2022 00:17:56 +0000 (08:17 +0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 12 Mar 2022 06:59:03 +0000 (22:59 -0800)
The print function dev_err() is redundant because platform_get_irq()
already prints an error.

Eliminate the follow coccicheck warning:
./drivers/net/ethernet/8390/mcf8390.c:414:2-9: line 414 is redundant
because platform_get_irq() already prints an error

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220311001756.12234-1-yang.lee@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/8390/mcf8390.c

index 90cd7bdf06f5d92b8e420eceab33c0e2c680834b..21047ae1bc3d3d49700afe1a59550de0b4ddfdb3 100644 (file)
@@ -410,10 +410,8 @@ static int mcf8390_probe(struct platform_device *pdev)
        int ret, irq;
 
        irq = platform_get_irq(pdev, 0);
-       if (irq < 0) {
-               dev_err(&pdev->dev, "no IRQ specified?\n");
+       if (irq < 0)
                return -ENXIO;
-       }
 
        mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (mem == NULL) {