2013-08-23 02:59:19

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] dma: cppi41: fix error return code in cppi41_dma_probe()

From: Wei Yongjun <[email protected]>

Fix to return -EINVAL in the irq parse and map error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/dma/cppi41.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c
index 5dcebca..49ea05a 100644
--- a/drivers/dma/cppi41.c
+++ b/drivers/dma/cppi41.c
@@ -973,8 +973,10 @@ static int cppi41_dma_probe(struct platform_device *pdev)
goto err_chans;

irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
- if (!irq)
+ if (!irq) {
+ ret = -EINVAL;
goto err_irq;
+ }

cppi_writel(USBSS_IRQ_PD_COMP, cdd->usbss_mem + USBSS_IRQ_ENABLER);


2013-08-26 09:15:35

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH -next] dma: cppi41: fix error return code in cppi41_dma_probe()

On Fri, Aug 23, 2013 at 10:59:15AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> Fix to return -EINVAL in the irq parse and map error handling
> case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <[email protected]>

This need to go thru USB tree

Acked-by Vinod Koul <[email protected]>

~Vinod
> ---
> drivers/dma/cppi41.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c
> index 5dcebca..49ea05a 100644
> --- a/drivers/dma/cppi41.c
> +++ b/drivers/dma/cppi41.c
> @@ -973,8 +973,10 @@ static int cppi41_dma_probe(struct platform_device *pdev)
> goto err_chans;
>
> irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
> - if (!irq)
> + if (!irq) {
> + ret = -EINVAL;
> goto err_irq;
> + }
>
> cppi_writel(USBSS_IRQ_PD_COMP, cdd->usbss_mem + USBSS_IRQ_ENABLER);
>
>

--