diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-11-23 21:25:30 +0530 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2018-01-03 10:10:51 +0900 |
commit | 01e1429b877ece6576eb59b74f613b630f859478 (patch) | |
tree | 9f50d30367a34cdd6713d666e42dcd312f7ec371 | |
parent | c7eb47f9e45226571be31212f6efd4b307d3b59d (diff) | |
download | linux-01e1429b877ece6576eb59b74f613b630f859478.tar.bz2 |
extcon: axp288:: Handle return value of platform_get_irq
platform_get_irq() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
-rw-r--r-- | drivers/extcon/extcon-axp288.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c index 981fba56bc18..e16a7838cac3 100644 --- a/drivers/extcon/extcon-axp288.c +++ b/drivers/extcon/extcon-axp288.c @@ -301,6 +301,9 @@ static int axp288_extcon_probe(struct platform_device *pdev) for (i = 0; i < EXTCON_IRQ_END; i++) { pirq = platform_get_irq(pdev, i); + if (pirq < 0) + return pirq; + info->irq[i] = regmap_irq_get_virq(info->regmap_irqc, pirq); if (info->irq[i] < 0) { dev_err(&pdev->dev, |