Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1284495 > unrolled thread

Re: [PATCH] dmaengine: stm32-dma: Fix static checker warning

Started byVinod Koul <vinod.koul@intel.com>
First post2015-12-05 09:20 +0100
Last post2015-12-05 09:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] dmaengine: stm32-dma: Fix static checker warning Vinod Koul <vinod.koul@intel.com> - 2015-12-05 09:20 +0100

#1284495 — Re: [PATCH] dmaengine: stm32-dma: Fix static checker warning

FromVinod Koul <vinod.koul@intel.com>
Date2015-12-05 09:20 +0100
SubjectRe: [PATCH] dmaengine: stm32-dma: Fix static checker warning
Message-ID<qCgeu-6L0-7@gated-at.bofh.it>
On Tue, Nov 24, 2015 at 09:52:35AM +0100, M'boumba Cedric Madianga wrote:

Title should say what is fixes rather than what flagged it off

> This patch fix an unchecked dereference warning by returning operation
> not permitted when stm32_dma_start_transfer() does not succeed to allocate
> a virtual channel descriptor.
> 

Also we give credit to reported by using tag Reported-by: xxx, pls add that
as well

> Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@gmail.com>
> ---
>  drivers/dma/stm32-dma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c
> index 12f3a3e..0214bcf 100644
> --- a/drivers/dma/stm32-dma.c
> +++ b/drivers/dma/stm32-dma.c
> @@ -437,7 +437,7 @@ static int stm32_dma_start_transfer(struct stm32_dma_chan *chan)
>  	if (!chan->desc) {
>  		vdesc = vchan_next_desc(&chan->vchan);
>  		if (!vdesc)
> -			return 0;
> +			return -EPERM;
>  
>  		chan->desc = to_stm32_dma_desc(vdesc);
>  		chan->next_sg = 0;
> -- 
> 1.9.1
> 

-- 
~Vinod
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web