lkml.org 
[lkml]   [2022]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 115/121] dmaengine: stm32-dmamux: Fix PM disable depth imbalance in stm32_dmamux_probe
    Date
    From: Miaoqian Lin <linmq006@gmail.com>

    commit e831c7aba950f3ae94002b10321279654525e5ec upstream.

    The pm_runtime_enable will increase power disable depth.
    If the probe fails, we should use pm_runtime_disable() to balance
    pm_runtime_enable().

    Fixes: 4f3ceca254e0 ("dmaengine: stm32-dmamux: Add PM Runtime support")
    Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
    Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
    Link: https://lore.kernel.org/r/20220108085336.11992-1-linmq006@gmail.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/dma/stm32-dmamux.c | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    --- a/drivers/dma/stm32-dmamux.c
    +++ b/drivers/dma/stm32-dmamux.c
    @@ -292,10 +292,12 @@ static int stm32_dmamux_probe(struct pla
    ret = of_dma_router_register(node, stm32_dmamux_route_allocate,
    &stm32_dmamux->dmarouter);
    if (ret)
    - goto err_clk;
    + goto pm_disable;

    return 0;

    +pm_disable:
    + pm_runtime_disable(&pdev->dev);
    err_clk:
    clk_disable_unprepare(stm32_dmamux->clk);


    \
     
     \ /
      Last update: 2022-02-21 19:22    [W:4.125 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site