Skip to content

Commit 37a86b3

Browse files
Yihao Hanbroonie
authored andcommitted
ASoC: ux500: mop500: Check before clk_put() not needed
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>
1 parent c5003f0 commit 37a86b3

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

sound/soc/ux500/mop500_ab8500.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -433,12 +433,9 @@ void mop500_ab8500_remove(struct snd_soc_card *card)
433433
{
434434
struct mop500_ab8500_drvdata *drvdata = snd_soc_card_get_drvdata(card);
435435

436-
if (drvdata->clk_ptr_sysclk != NULL)
437-
clk_put(drvdata->clk_ptr_sysclk);
438-
if (drvdata->clk_ptr_ulpclk != NULL)
439-
clk_put(drvdata->clk_ptr_ulpclk);
440-
if (drvdata->clk_ptr_intclk != NULL)
441-
clk_put(drvdata->clk_ptr_intclk);
436+
clk_put(drvdata->clk_ptr_sysclk);
437+
clk_put(drvdata->clk_ptr_ulpclk);
438+
clk_put(drvdata->clk_ptr_intclk);
442439

443440
snd_soc_card_set_drvdata(card, drvdata);
444441
}

0 commit comments

Comments
 (0)