lkml.org 
[lkml]   [2020]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.7 102/477] ASoC: meson: add missing free_irq() in error path
    Date
    From: Pavel Machek (CIP) <pavel@denx.de>

    [ Upstream commit 3b8a299a58b2afce464ae11324b59dcf0f1d10a7 ]

    free_irq() is missing in case of error, fix that.

    Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
    Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>

    Link: https://lore.kernel.org/r/20200606153103.GA17905@amd
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    sound/soc/meson/axg-fifo.c | 10 ++++++++--
    1 file changed, 8 insertions(+), 2 deletions(-)

    diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c
    index 2e9b56b29d313..b2e867113226b 100644
    --- a/sound/soc/meson/axg-fifo.c
    +++ b/sound/soc/meson/axg-fifo.c
    @@ -249,7 +249,7 @@ int axg_fifo_pcm_open(struct snd_soc_component *component,
    /* Enable pclk to access registers and clock the fifo ip */
    ret = clk_prepare_enable(fifo->pclk);
    if (ret)
    - return ret;
    + goto free_irq;

    /* Setup status2 so it reports the memory pointer */
    regmap_update_bits(fifo->map, FIFO_CTRL1,
    @@ -269,8 +269,14 @@ int axg_fifo_pcm_open(struct snd_soc_component *component,
    /* Take memory arbitror out of reset */
    ret = reset_control_deassert(fifo->arb);
    if (ret)
    - clk_disable_unprepare(fifo->pclk);
    + goto free_clk;
    +
    + return 0;

    +free_clk:
    + clk_disable_unprepare(fifo->pclk);
    +free_irq:
    + free_irq(fifo->irq, ss);
    return ret;
    }
    EXPORT_SYMBOL_GPL(axg_fifo_pcm_open);
    --
    2.25.1


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