linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] dmaengine: fsl-qdma: check dma_set_mask return value
@ 2021-04-23  9:29 Robin Gong
  2021-04-25 16:19 ` Vinod Koul
  0 siblings, 1 reply; 3+ messages in thread
From: Robin Gong @ 2021-04-23  9:29 UTC (permalink / raw)
  To: vkoul; +Cc: dmaengine, linux-kernel

For fix warning reported by static code analysis tool like Coverity from
Synopsys.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
---
 drivers/dma/fsl-qdma.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/fsl-qdma.c b/drivers/dma/fsl-qdma.c
index ed2ab46..86c02b6 100644
--- a/drivers/dma/fsl-qdma.c
+++ b/drivers/dma/fsl-qdma.c
@@ -1235,7 +1235,11 @@ static int fsl_qdma_probe(struct platform_device *pdev)
 	fsl_qdma->dma_dev.device_synchronize = fsl_qdma_synchronize;
 	fsl_qdma->dma_dev.device_terminate_all = fsl_qdma_terminate_all;
 
-	dma_set_mask(&pdev->dev, DMA_BIT_MASK(40));
+	ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(40));
+	if (ret) {
+		dev_err(&pdev->dev, "dma_set_mask failure.\n");
+		return ret;
+	}
 
 	platform_set_drvdata(pdev, fsl_qdma);
 
-- 
2.7.4


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

* Re: [PATCH v2] dmaengine: fsl-qdma: check dma_set_mask return value
  2021-04-23  9:29 [PATCH v2] dmaengine: fsl-qdma: check dma_set_mask return value Robin Gong
@ 2021-04-25 16:19 ` Vinod Koul
  2021-04-26  0:36   ` Robin Gong
  0 siblings, 1 reply; 3+ messages in thread
From: Vinod Koul @ 2021-04-25 16:19 UTC (permalink / raw)
  To: Robin Gong; +Cc: dmaengine, linux-kernel

On 23-04-21, 17:29, Robin Gong wrote:
> For fix warning reported by static code analysis tool like Coverity from
> Synopsys.

Please mention which warning, also Coverity id
Do see other patches which add coverity ids

> 
> Signed-off-by: Robin Gong <yibin.gong@nxp.com>
> ---
>  drivers/dma/fsl-qdma.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/fsl-qdma.c b/drivers/dma/fsl-qdma.c
> index ed2ab46..86c02b6 100644
> --- a/drivers/dma/fsl-qdma.c
> +++ b/drivers/dma/fsl-qdma.c
> @@ -1235,7 +1235,11 @@ static int fsl_qdma_probe(struct platform_device *pdev)
>  	fsl_qdma->dma_dev.device_synchronize = fsl_qdma_synchronize;
>  	fsl_qdma->dma_dev.device_terminate_all = fsl_qdma_terminate_all;
>  
> -	dma_set_mask(&pdev->dev, DMA_BIT_MASK(40));
> +	ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(40));
> +	if (ret) {
> +		dev_err(&pdev->dev, "dma_set_mask failure.\n");
> +		return ret;
> +	}
>  
>  	platform_set_drvdata(pdev, fsl_qdma);
>  
> -- 
> 2.7.4

-- 
~Vinod

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

* RE: [PATCH v2] dmaengine: fsl-qdma: check dma_set_mask return value
  2021-04-25 16:19 ` Vinod Koul
@ 2021-04-26  0:36   ` Robin Gong
  0 siblings, 0 replies; 3+ messages in thread
From: Robin Gong @ 2021-04-26  0:36 UTC (permalink / raw)
  To: Vinod Koul; +Cc: dmaengine, linux-kernel

On 2021/04/26 Vinod Koul <vkoul@kernel.org> wrote: 
> On 23-04-21, 17:29, Robin Gong wrote:
> > For fix warning reported by static code analysis tool like Coverity
> > from Synopsys.
> 
> Please mention which warning, also Coverity id Do see other patches which
> add coverity ids
> 
Okay, would add it in v3, thanks.

> > Signed-off-by: Robin Gong <yibin.gong@nxp.com>
> > ---
> >  drivers/dma/fsl-qdma.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/dma/fsl-qdma.c b/drivers/dma/fsl-qdma.c index
> > ed2ab46..86c02b6 100644
> > --- a/drivers/dma/fsl-qdma.c
> > +++ b/drivers/dma/fsl-qdma.c
> > @@ -1235,7 +1235,11 @@ static int fsl_qdma_probe(struct
> platform_device *pdev)
> >  	fsl_qdma->dma_dev.device_synchronize = fsl_qdma_synchronize;
> >  	fsl_qdma->dma_dev.device_terminate_all = fsl_qdma_terminate_all;
> >
> > -	dma_set_mask(&pdev->dev, DMA_BIT_MASK(40));
> > +	ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(40));
> > +	if (ret) {
> > +		dev_err(&pdev->dev, "dma_set_mask failure.\n");
> > +		return ret;
> > +	}
> >
> >  	platform_set_drvdata(pdev, fsl_qdma);
> >
> > --
> > 2.7.4
> 
> --
> ~Vinod

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

end of thread, other threads:[~2021-04-26  0:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23  9:29 [PATCH v2] dmaengine: fsl-qdma: check dma_set_mask return value Robin Gong
2021-04-25 16:19 ` Vinod Koul
2021-04-26  0:36   ` Robin Gong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).