mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 23:24:11 +08:00
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>
This commit is contained in:
parent
c7eb47f9e4
commit
01e1429b87
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user