diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-11-23 16:55:30 +0100 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2018-01-03 02:10:51 +0100 |
commit | 01e1429b877ece6576eb59b74f613b630f859478 (patch) | |
tree | 9f50d30367a34cdd6713d666e42dcd312f7ec371 /drivers/extcon | |
parent | extcon: usbc-cros-ec: add support to notify USB type cables. (diff) | |
download | linux-01e1429b877ece6576eb59b74f613b630f859478.tar.xz linux-01e1429b877ece6576eb59b74f613b630f859478.zip |
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>
Diffstat (limited to 'drivers/extcon')
-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, |