lkml.org 
[lkml]   [2021]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 141/340] dmaengine: owl-dma: Fix a resource leak in the remove function
    Date
    From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

    [ Upstream commit 1f0a16f04113f9f0ab0c8e6d3abe661edab549e6 ]

    A 'dma_pool_destroy()' call is missing in the remove function.
    Add it.

    This call is already made in the error handling path of the probe function.

    Fixes: 47e20577c24d ("dmaengine: Add Actions Semi Owl family S900 DMA driver")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/20201212162535.95727-1-christophe.jaillet@wanadoo.fr
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/dma/owl-dma.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/drivers/dma/owl-dma.c b/drivers/dma/owl-dma.c
    index af20e9a790a2a..bb9c361e224bc 100644
    --- a/drivers/dma/owl-dma.c
    +++ b/drivers/dma/owl-dma.c
    @@ -1201,6 +1201,7 @@ static int owl_dma_remove(struct platform_device *pdev)
    owl_dma_free(od);

    clk_disable_unprepare(od->clk);
    + dma_pool_destroy(od->lli_pool);

    return 0;
    }
    --
    2.27.0


    \
     
     \ /
      Last update: 2021-03-01 23:42    [W:2.089 / U:0.216 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site