Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

misc: hi6421-spmi-pmic: Remove redundant dev_err()

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>

authored by

Ruan Jinjie and committed by
Greg Kroah-Hartman
32fd0989 d9c58aeb

+1 -3
+1 -3
drivers/misc/hi6421v600-irq.c
··· 244 244 pmic_pdev = container_of(pmic_dev, struct platform_device, dev); 245 245 246 246 priv->irq = platform_get_irq(pmic_pdev, 0); 247 - if (priv->irq < 0) { 248 - dev_err(dev, "Error %d when getting IRQs\n", priv->irq); 247 + if (priv->irq < 0) 249 248 return priv->irq; 250 - } 251 249 252 250 platform_set_drvdata(pdev, priv); 253 251