2013-05-21 15:11:13

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] gpio-ml-ioh: fix error return code in ioh_gpio_probe()

From: Wei Yongjun <[email protected]>

Fix to return a negative error code in the irq descs alloc error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/gpio/gpio-ml-ioh.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-ml-ioh.c b/drivers/gpio/gpio-ml-ioh.c
index 0966f26..6da6d76 100644
--- a/drivers/gpio/gpio-ml-ioh.c
+++ b/drivers/gpio/gpio-ml-ioh.c
@@ -465,6 +465,7 @@ static int ioh_gpio_probe(struct pci_dev *pdev,
dev_warn(&pdev->dev,
"ml_ioh_gpio: Failed to get IRQ base num\n");
chip->irq_base = -1;
+ ret = irq_base;
goto err_irq_alloc_descs;
}
chip->irq_base = irq_base;


2013-05-30 17:40:07

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH -next] gpio-ml-ioh: fix error return code in ioh_gpio_probe()

On Tue, May 21, 2013 at 5:11 PM, Wei Yongjun <[email protected]> wrote:

> From: Wei Yongjun <[email protected]>
>
> Fix to return a negative error code in the irq descs alloc error
> handling case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <[email protected]>

Patch applied.

Yours,
Linus Walleij