summaryrefslogtreecommitdiff
path: root/sound/soc/ux500
diff options
context:
space:
mode:
authorYihao Han <hanyihao@vivo.com>2022-05-17 06:30:46 +0300
committerMark Brown <broonie@kernel.org>2022-05-17 13:58:54 +0300
commit37a86b32bf0e5c5ca23567d7b120306b9ac8497d (patch)
tree2b504d3cde7a3e0330fc946c0bea7b47d00d2823 /sound/soc/ux500
parentc5003f08fe671fb1f18bca07e589c5cffeccbc9b (diff)
downloadlinux-37a86b32bf0e5c5ca23567d7b120306b9ac8497d.tar.xz
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>
Diffstat (limited to 'sound/soc/ux500')
-rw-r--r--sound/soc/ux500/mop500_ab8500.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/soc/ux500/mop500_ab8500.c b/sound/soc/ux500/mop500_ab8500.c
index 3e654e708f78..1ea1729984a9 100644
--- a/sound/soc/ux500/mop500_ab8500.c
+++ b/sound/soc/ux500/mop500_ab8500.c
@@ -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);
}