Skip to content

Commit

Permalink
regulator: mt6360: remove redundant error print
Browse files Browse the repository at this point in the history
fixes coccicheck warning:

drivers/regulator/mt6360-regulator.c:384:3-10: line 384 is
redundant because platform_get_irq() already prints an error

in fact it is not platform_get_irq but platform_get_irq_byname print error

Signed-off-by: Jian Dong <dongjian@yulong.com>
Link: https://lore.kernel.org/r/1616555474-158789-1-git-send-email-dj0227@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Jian Dong authored and Mark Brown committed Mar 24, 2021
1 parent 320fcd6 commit f56f2b9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/regulator/mt6360-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,8 @@ static int mt6360_regulator_irq_register(struct platform_device *pdev,
const struct mt6360_irq_mapping *irq_desc = tbls + i;

irq = platform_get_irq_byname(pdev, irq_desc->name);
if (irq < 0) {
dev_err(&pdev->dev, "Fail to get %s irq\n", irq_desc->name);
if (irq < 0)
return irq;
}

ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, irq_desc->handler, 0,
irq_desc->name, rdev);
Expand Down

0 comments on commit f56f2b9

Please sign in to comment.