2013-09-11 11:20:40

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH] MFD: ucb1x00-core: fix error return code in ucb1x00_probe()

From: Wei Yongjun <[email protected]>

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

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

diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
index b7cf98f..10f2e8d 100644
--- a/drivers/mfd/ucb1x00-core.c
+++ b/drivers/mfd/ucb1x00-core.c
@@ -551,6 +551,7 @@ static int ucb1x00_probe(struct mcp *mcp)
if (ucb->irq_base < 0) {
dev_err(&ucb->dev, "unable to allocate 16 irqs: %d\n",
ucb->irq_base);
+ ret = ucb->irq_base;
goto err_irq_alloc;
}


2013-09-12 15:43:12

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH] MFD: ucb1x00-core: fix error return code in ucb1x00_probe()

On Wed, 11 Sep 2013, Wei Yongjun wrote:

> From: Wei Yongjun <[email protected]>
>
> Fix to return a negative error code in the irq alloc error handling
> case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <[email protected]>
> ---
> drivers/mfd/ucb1x00-core.c | 1 +
> 1 file changed, 1 insertion(+)

Applied, thanks.

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog