All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] qcom: bam_dma: Delete useless kfree code
@ 2020-12-16 13:06 Zheng Yongjun
  2020-12-16 18:32 ` Bjorn Andersson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Zheng Yongjun @ 2020-12-16 13:06 UTC (permalink / raw)
  To: agross, bjorn.andersson, dan.j.williams, vkoul, linux-arm-msm,
	dmaengine, linux-kernel
  Cc: Zheng Yongjun

The parameter of kfree function is NULL, so kfree code is useless, delete it.
Therefore, goto expression is no longer needed, so simplify it.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/dma/qcom/bam_dma.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
index 4eeb8bb27279..78df217b3f6c 100644
--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -630,7 +630,7 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan,
 			     GFP_NOWAIT);
 
 	if (!async_desc)
-		goto err_out;
+		return NULL;
 
 	if (flags & DMA_PREP_FENCE)
 		async_desc->flags |= DESC_FLAG_NWD;
@@ -670,10 +670,6 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan,
 	}
 
 	return vchan_tx_prep(&bchan->vc, &async_desc->vd, flags);
-
-err_out:
-	kfree(async_desc);
-	return NULL;
 }
 
 /**
-- 
2.22.0


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

* Re: [PATCH -next] qcom: bam_dma: Delete useless kfree code
  2020-12-16 13:06 [PATCH -next] qcom: bam_dma: Delete useless kfree code Zheng Yongjun
@ 2020-12-16 18:32 ` Bjorn Andersson
  2020-12-21 16:23 ` Vinod Koul
  2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
  2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2020-12-16 18:32 UTC (permalink / raw)
  To: Zheng Yongjun
  Cc: agross, dan.j.williams, vkoul, linux-arm-msm, dmaengine, linux-kernel

On Wed 16 Dec 07:06 CST 2020, Zheng Yongjun wrote:

> The parameter of kfree function is NULL, so kfree code is useless, delete it.
> Therefore, goto expression is no longer needed, so simplify it.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---
>  drivers/dma/qcom/bam_dma.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
> index 4eeb8bb27279..78df217b3f6c 100644
> --- a/drivers/dma/qcom/bam_dma.c
> +++ b/drivers/dma/qcom/bam_dma.c
> @@ -630,7 +630,7 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan,
>  			     GFP_NOWAIT);
>  
>  	if (!async_desc)
> -		goto err_out;
> +		return NULL;
>  
>  	if (flags & DMA_PREP_FENCE)
>  		async_desc->flags |= DESC_FLAG_NWD;
> @@ -670,10 +670,6 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan,
>  	}
>  
>  	return vchan_tx_prep(&bchan->vc, &async_desc->vd, flags);
> -
> -err_out:
> -	kfree(async_desc);
> -	return NULL;
>  }
>  
>  /**
> -- 
> 2.22.0
> 

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

* Re: [PATCH -next] qcom: bam_dma: Delete useless kfree code
  2020-12-16 13:06 [PATCH -next] qcom: bam_dma: Delete useless kfree code Zheng Yongjun
  2020-12-16 18:32 ` Bjorn Andersson
@ 2020-12-21 16:23 ` Vinod Koul
  2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
  2 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2020-12-21 16:23 UTC (permalink / raw)
  To: Zheng Yongjun
  Cc: agross, bjorn.andersson, dan.j.williams, linux-arm-msm,
	dmaengine, linux-kernel

On 16-12-20, 21:06, Zheng Yongjun wrote:
> The parameter of kfree function is NULL, so kfree code is useless, delete it.
> Therefore, goto expression is no longer needed, so simplify it.

Applied, thanks

-- 
~Vinod

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

* Re: [PATCH -next] qcom: bam_dma: Delete useless kfree code
  2020-12-16 13:06 [PATCH -next] qcom: bam_dma: Delete useless kfree code Zheng Yongjun
  2020-12-16 18:32 ` Bjorn Andersson
  2020-12-21 16:23 ` Vinod Koul
@ 2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-03-01 19:59 UTC (permalink / raw)
  To: Zheng Yongjun; +Cc: linux-arm-msm

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

On Wed, 16 Dec 2020 21:06:49 +0800 you wrote:
> The parameter of kfree function is NULL, so kfree code is useless, delete it.
> Therefore, goto expression is no longer needed, so simplify it.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---
>  drivers/dma/qcom/bam_dma.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

Here is the summary with links:
  - [-next] qcom: bam_dma: Delete useless kfree code
    https://git.kernel.org/qcom/c/ba42f61b3612

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-03-01 20:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 13:06 [PATCH -next] qcom: bam_dma: Delete useless kfree code Zheng Yongjun
2020-12-16 18:32 ` Bjorn Andersson
2020-12-21 16:23 ` Vinod Koul
2021-03-01 19:59 ` patchwork-bot+linux-arm-msm

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.