misc: hi6421-spmi-pmic: Remove redundant dev_err()
authorRuan Jinjie <ruanjinjie@huawei.com>
Wed, 26 Jul 2023 18:07:07 +0000 (18:07 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2023 13:39:10 +0000 (15:39 +0200)
There is no need to call the dev_err() function directly to print a custom
message when handling an error from the platform_get_irq() function as it
is going to display an appropriate error message in case of a failure.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230726180707.2486808-1-ruanjinjie@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/hi6421v600-irq.c

index caa3de3..b075d80 100644 (file)
@@ -244,10 +244,8 @@ static int hi6421v600_irq_probe(struct platform_device *pdev)
        pmic_pdev = container_of(pmic_dev, struct platform_device, dev);
 
        priv->irq = platform_get_irq(pmic_pdev, 0);
-       if (priv->irq < 0) {
-               dev_err(dev, "Error %d when getting IRQs\n", priv->irq);
+       if (priv->irq < 0)
                return priv->irq;
-       }
 
        platform_set_drvdata(pdev, priv);