diff options
author | Yang Li <yang.lee@linux.alibaba.com> | 2022-05-04 15:52:14 +0200 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2022-06-09 20:27:21 +0200 |
commit | b770583ba6028e8cbd2d49dad9eff63cba3d6fef (patch) | |
tree | b6cd3fa0861c679a8fa44fe81ce87fe36026cf07 | |
parent | power: supply: lp8788: fix typo in comment (diff) | |
download | linux-b770583ba6028e8cbd2d49dad9eff63cba3d6fef.tar.xz linux-b770583ba6028e8cbd2d49dad9eff63cba3d6fef.zip |
power: supply: Remove unnecessary print function dev_err()
The print function dev_err() is redundant because
platform_get_irq() already prints an error.
Eliminate the follow coccicheck warning:
./drivers/power/supply/goldfish_battery.c:225:2-9: line 225 is
redundant because platform_get_irq() already prints an error
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
-rw-r--r-- | drivers/power/supply/goldfish_battery.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/power/supply/goldfish_battery.c b/drivers/power/supply/goldfish_battery.c index bf1754355c9f..a58d713d75ce 100644 --- a/drivers/power/supply/goldfish_battery.c +++ b/drivers/power/supply/goldfish_battery.c @@ -221,10 +221,8 @@ static int goldfish_battery_probe(struct platform_device *pdev) } data->irq = platform_get_irq(pdev, 0); - if (data->irq < 0) { - dev_err(&pdev->dev, "platform_get_irq failed\n"); + if (data->irq < 0) return -ENODEV; - } ret = devm_request_irq(&pdev->dev, data->irq, goldfish_battery_interrupt, |