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

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>

authored by

Sergey Shtylyov and committed by
Sebastian Reichel
2b7950c7 441d38c6

+2 -4
+2 -4
drivers/power/supply/mp2629_charger.c
··· 580 580 charger->dev = dev; 581 581 platform_set_drvdata(pdev, charger); 582 582 583 - irq = platform_get_irq_optional(to_platform_device(dev->parent), 0); 584 - if (irq < 0) { 585 - dev_err(dev, "get irq fail: %d\n", irq); 583 + irq = platform_get_irq(to_platform_device(dev->parent), 0); 584 + if (irq < 0) 586 585 return irq; 587 - } 588 586 589 587 for (i = 0; i < MP2629_MAX_FIELD; i++) { 590 588 charger->regmap_fields[i] = devm_regmap_field_alloc(dev,