Re: [PATCH] dmaengine: pl08x: remove unneeded variable: "retval". Return "NULL"
From: Vinod Koul
Date: Mon Apr 11 2022 - 10:05:56 EST
On 17-03-22, 18:22, Haowen Bai wrote:
> Unneeded variable: "retval". Return "NULL" , so we have to make code clear.
>
> Signed-off-by: Haowen Bai <baihaowen@xxxxxxxxx>
> ---
> drivers/dma/amba-pl08x.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
> index a24882b..c70552a 100644
> --- a/drivers/dma/amba-pl08x.c
> +++ b/drivers/dma/amba-pl08x.c
> @@ -1538,9 +1538,7 @@ static void pl08x_free_chan_resources(struct dma_chan *chan)
> static struct dma_async_tx_descriptor *pl08x_prep_dma_interrupt(
> struct dma_chan *chan, unsigned long flags)
> {
> - struct dma_async_tx_descriptor *retval = NULL;
> -
> - return retval;
> + return NULL;
better way, drop the function?
> }
>
> /*
> --
> 2.7.4
--
~Vinod