All of lore.kernel.org
 help / color / mirror / Atom feed
* [-next] dmaengine: fsl-edma: fix the error return code in mcf_edma_probe()
@ 2018-07-04  8:21 ` Wei Yongjun
  0 siblings, 0 replies; 4+ messages in thread
From: weiyongjun (A) @ 2018-07-04  8:21 UTC (permalink / raw)
  To: Vinod Koul, Dan Williams, Angelo Dureghello
  Cc: Wei Yongjun, dmaengine, kernel-janitors

The error return code PTR_ERR(pdata) is always 0 since pdata is
NULL in this error handling case.

Fixes: 5c1355ad87a2 ("dmaengine: fsl-edma: add ColdFire mcf5441x edma support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/dma/mcf-edma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

diff --git a/drivers/dma/mcf-edma.c b/drivers/dma/mcf-edma.c
index 31e5317..787b7b6 100644
--- a/drivers/dma/mcf-edma.c
+++ b/drivers/dma/mcf-edma.c
@@ -175,7 +175,7 @@ static int mcf_edma_probe(struct platform_device *pdev)
 
 	pdata = dev_get_platdata(&pdev->dev);
 	if (!pdata)
-		return PTR_ERR(pdata);
+		return -EINVAL;
 
 	chans = pdata->dma_channels;
 	len = sizeof(*mcf_edma) + sizeof(*mcf_chan) * chans;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH -next] dmaengine: fsl-edma: fix the error return code in mcf_edma_probe()
@ 2018-07-04  8:21 ` Wei Yongjun
  0 siblings, 0 replies; 4+ messages in thread
From: Wei Yongjun @ 2018-07-04  8:21 UTC (permalink / raw)
  To: Vinod Koul, Dan Williams, Angelo Dureghello
  Cc: Wei Yongjun, dmaengine, kernel-janitors

The error return code PTR_ERR(pdata) is always 0 since pdata is
NULL in this error handling case.

Fixes: 5c1355ad87a2 ("dmaengine: fsl-edma: add ColdFire mcf5441x edma support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/dma/mcf-edma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/mcf-edma.c b/drivers/dma/mcf-edma.c
index 31e5317..787b7b6 100644
--- a/drivers/dma/mcf-edma.c
+++ b/drivers/dma/mcf-edma.c
@@ -175,7 +175,7 @@ static int mcf_edma_probe(struct platform_device *pdev)
 
 	pdata = dev_get_platdata(&pdev->dev);
 	if (!pdata)
-		return PTR_ERR(pdata);
+		return -EINVAL;
 
 	chans = pdata->dma_channels;
 	len = sizeof(*mcf_edma) + sizeof(*mcf_chan) * chans;


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [-next] dmaengine: fsl-edma: fix the error return code in mcf_edma_probe()
  2018-07-04  8:21 ` [PATCH -next] " Wei Yongjun
@ 2018-07-04  9:04 ` Angelo Dureghello
  -1 siblings, 0 replies; 4+ messages in thread
From: Angelo Dureghello @ 2018-07-04  9:04 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Vinod Koul, Dan Williams, dmaengine, kernel-janitors

Reviewed-by: Angelo Dureghello <angelo@sysam.it>

Thanks for the fix.

On Wed, Jul 04, 2018 at 08:21:51AM +0000, Wei Yongjun wrote:
> The error return code PTR_ERR(pdata) is always 0 since pdata is
> NULL in this error handling case.
> 
> Fixes: 5c1355ad87a2 ("dmaengine: fsl-edma: add ColdFire mcf5441x edma support")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/dma/mcf-edma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/mcf-edma.c b/drivers/dma/mcf-edma.c
> index 31e5317..787b7b6 100644
> --- a/drivers/dma/mcf-edma.c
> +++ b/drivers/dma/mcf-edma.c
> @@ -175,7 +175,7 @@ static int mcf_edma_probe(struct platform_device *pdev)
>  
>  	pdata = dev_get_platdata(&pdev->dev);
>  	if (!pdata)
> -		return PTR_ERR(pdata);
> +		return -EINVAL;
>  
>  	chans = pdata->dma_channels;
>  	len = sizeof(*mcf_edma) + sizeof(*mcf_chan) * chans;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe dmaengine" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
---
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] dmaengine: fsl-edma: fix the error return code in mcf_edma_probe()
@ 2018-07-04  9:04 ` Angelo Dureghello
  0 siblings, 0 replies; 4+ messages in thread
From: Angelo Dureghello @ 2018-07-04  9:04 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Vinod Koul, Dan Williams, dmaengine, kernel-janitors

Reviewed-by: Angelo Dureghello <angelo@sysam.it>

Thanks for the fix.

On Wed, Jul 04, 2018 at 08:21:51AM +0000, Wei Yongjun wrote:
> The error return code PTR_ERR(pdata) is always 0 since pdata is
> NULL in this error handling case.
> 
> Fixes: 5c1355ad87a2 ("dmaengine: fsl-edma: add ColdFire mcf5441x edma support")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/dma/mcf-edma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/mcf-edma.c b/drivers/dma/mcf-edma.c
> index 31e5317..787b7b6 100644
> --- a/drivers/dma/mcf-edma.c
> +++ b/drivers/dma/mcf-edma.c
> @@ -175,7 +175,7 @@ static int mcf_edma_probe(struct platform_device *pdev)
>  
>  	pdata = dev_get_platdata(&pdev->dev);
>  	if (!pdata)
> -		return PTR_ERR(pdata);
> +		return -EINVAL;
>  
>  	chans = pdata->dma_channels;
>  	len = sizeof(*mcf_edma) + sizeof(*mcf_chan) * chans;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe dmaengine" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-04  9:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-04  8:21 [-next] dmaengine: fsl-edma: fix the error return code in mcf_edma_probe() weiyongjun (A)
2018-07-04  8:21 ` [PATCH -next] " Wei Yongjun
2018-07-04  9:04 [-next] " Angelo Dureghello
2018-07-04  9:04 ` [PATCH -next] " Angelo Dureghello

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.