spi: s3c64xx: Clean up redundant dev_err_probe()
authorChen Jiahao <chenjiahao16@huawei.com>
Thu, 27 Jul 2023 13:16:35 +0000 (21:16 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 27 Jul 2023 16:33:05 +0000 (17:33 +0100)
Referring to platform_get_irq()'s definition, the return value has
already been checked if ret < 0, and printed via dev_err_probe().
Calling dev_err_probe() one more time outside platform_get_irq()
is obviously redundant.

Removing dev_err_probe() outside platform_get_irq() to clean up
above problem.

Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20230727131635.2898051-1-chenjiahao16@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-s3c64xx.c

index a1b68fdc205da00369c7b19fc892d169be3eb354..bf7cb18be9dc53be84343c6e3e90e74b406b5df9 100644 (file)
@@ -1167,7 +1167,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
 
        irq = platform_get_irq(pdev, 0);
        if (irq < 0)
-               return dev_err_probe(&pdev->dev, irq, "Failed to get IRQ\n");
+               return irq;
 
        master = devm_spi_alloc_master(&pdev->dev, sizeof(*sdd));
        if (!master)