[PATCH] dmaengine: imx-sdma: Remove useless null check before call of_node_put()
Vinod Koul
vkoul at kernel.org
Thu Apr 21 23:10:11 PDT 2022
On 21-04-22, 10:49, Haowen Bai wrote:
> No need to add null check before call of_node_put(), since the
> implementation of of_node_put() has done it.
>
> Signed-off-by: Haowen Bai <baihaowen at meizu.com>
> ---
> drivers/dma/imx-sdma.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> index 6196a7b3956b..b8a1299b93f0 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -1933,8 +1933,7 @@ static int sdma_event_remap(struct sdma_engine *sdma)
> }
>
> out:
> - if (gpr_np)
> - of_node_put(gpr_np);
> + of_node_put(gpr_np);
this is incorrect as it is called on error case
--
~Vinod
More information about the linux-arm-kernel
mailing list