summaryrefslogtreecommitdiff
path: root/drivers/power/supply/mp2629_charger.c
diff options
context:
space:
mode:
authorSergey Shtylyov <s.shtylyov@omp.ru>2022-01-27 22:44:25 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2022-02-01 12:32:35 +0300
commit2b7950c7ac9117a18f1790fcea819cb69380e5bd (patch)
treeca0cdeae34a8e91d130fae047e5e322ea18acd5f /drivers/power/supply/mp2629_charger.c
parent441d38c60fbe5b416e562853aa3041c7dcaf3af7 (diff)
downloadlinux-2b7950c7ac9117a18f1790fcea819cb69380e5bd.tar.xz
power: supply: mp2629_charger: use platform_get_irq()
Calling platform_get_irq_optional() doesn't make sense if you then bail out on any error it returns. Switch to calling platform_get_irq() instead and remove dev_err() call as platform_get_irq() already curses loudly on error. Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power/supply/mp2629_charger.c')
-rw-r--r--drivers/power/supply/mp2629_charger.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/power/supply/mp2629_charger.c b/drivers/power/supply/mp2629_charger.c
index bdf924b73e47..bf9c27b463a8 100644
--- a/drivers/power/supply/mp2629_charger.c
+++ b/drivers/power/supply/mp2629_charger.c
@@ -580,11 +580,9 @@ static int mp2629_charger_probe(struct platform_device *pdev)
charger->dev = dev;
platform_set_drvdata(pdev, charger);
- irq = platform_get_irq_optional(to_platform_device(dev->parent), 0);
- if (irq < 0) {
- dev_err(dev, "get irq fail: %d\n", irq);
+ irq = platform_get_irq(to_platform_device(dev->parent), 0);
+ if (irq < 0)
return irq;
- }
for (i = 0; i < MP2629_MAX_FIELD; i++) {
charger->regmap_fields[i] = devm_regmap_field_alloc(dev,