Skip to content

Commit

Permalink
ASoC: ux500: mop500: Check before clk_put() not needed
Browse files Browse the repository at this point in the history
clk_put() already checks the clk ptr using !clk and IS_ERR()
so there is no need to check it again before calling it.

Signed-off-by: Yihao Han <hanyihao@vivo.com>
Link: https://lore.kernel.org/r/20220517033050.5191-1-hanyihao@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Yihao Han authored and broonie committed May 17, 2022
1 parent c5003f0 commit 37a86b3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sound/soc/ux500/mop500_ab8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,12 +433,9 @@ void mop500_ab8500_remove(struct snd_soc_card *card)
{
struct mop500_ab8500_drvdata *drvdata = snd_soc_card_get_drvdata(card);

if (drvdata->clk_ptr_sysclk != NULL)
clk_put(drvdata->clk_ptr_sysclk);
if (drvdata->clk_ptr_ulpclk != NULL)
clk_put(drvdata->clk_ptr_ulpclk);
if (drvdata->clk_ptr_intclk != NULL)
clk_put(drvdata->clk_ptr_intclk);
clk_put(drvdata->clk_ptr_sysclk);
clk_put(drvdata->clk_ptr_ulpclk);
clk_put(drvdata->clk_ptr_intclk);

snd_soc_card_set_drvdata(card, drvdata);
}

0 comments on commit 37a86b3

Please sign in to comment.