projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec4177c
)
ASoC: pxa: pxa-ssp: Remove redundant null check before clk_prepare_enable/clk_disable...
author
Xu Wang
<vulab@iscas.ac.cn>
Thu, 29 Oct 2020 09:01:04 +0000
(09:01 +0000)
committer
Mark Brown
<broonie@kernel.org>
Thu, 5 Nov 2020 14:52:35 +0000
(14:52 +0000)
ecause clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Link:
https://lore.kernel.org/r/20201029090104.29552-1-vulab@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/pxa/pxa-ssp.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/soc/pxa/pxa-ssp.c
b/sound/soc/pxa/pxa-ssp.c
index c4e7307a44374ed6bd329d2aa6c6333dce3646a0..b941adcbb8f9502c20e78a8577f16a12aa692cc7 100644
(file)
--- a/
sound/soc/pxa/pxa-ssp.c
+++ b/
sound/soc/pxa/pxa-ssp.c
@@
-99,8
+99,7
@@
static int pxa_ssp_startup(struct snd_pcm_substream *substream,
pxa_ssp_disable(ssp);
}
- if (priv->extclk)
- clk_prepare_enable(priv->extclk);
+ clk_prepare_enable(priv->extclk);
dma = kzalloc(sizeof(struct snd_dmaengine_dai_dma_data), GFP_KERNEL);
if (!dma)
@@
-124,8
+123,7
@@
static void pxa_ssp_shutdown(struct snd_pcm_substream *substream,
clk_disable_unprepare(ssp->clk);
}
- if (priv->extclk)
- clk_disable_unprepare(priv->extclk);
+ clk_disable_unprepare(priv->extclk);
kfree(snd_soc_dai_get_dma_data(cpu_dai, substream));
snd_soc_dai_set_dma_data(cpu_dai, substream, NULL);