Skip to content

Commit

Permalink
misc: hi6421-spmi-pmic: Remove redundant dev_err()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ruan Jinjie authored and Greg Kroah-Hartman committed Aug 4, 2023
1 parent d9c58ae commit 32fd098
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/misc/hi6421v600-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 32fd098

Please sign in to comment.