Skip to contentSkip to conversation

ASoC: ti: davinci-evm: Remove redundant null check before clk_disable_unprepare

PATCH In review Xu Wang 3 participants 3 messages Oct 29, 2020 – Nov 2, 2020

Subsystems (3)
lore
Share & tools
lore

Xu Wang

author
#0 lore raw

PATCH 1/1 ASoC: ti: davinci-evm: Remove redundant null check before clk_disable_unprepare

Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it.

---
 sound/soc/ti/davinci-evm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/ti/davinci-evm.c +1 -2
index 105e56ab9cdc..b043a0070d20 100644
@@ -46,8 +46,7 @@ static void evm_shutdown(struct snd_pcm_substream *substream)
 	struct snd_soc_card_drvdata_davinci *drvdata =
 		snd_soc_card_get_drvdata(soc_card);
 
-	if (drvdata->mclk)
-		clk_disable_unprepare(drvdata->mclk);
+	clk_disable_unprepare(drvdata->mclk);
 }
 
 static int evm_hw_params(struct snd_pcm_substream *substream,
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Xu Wang

Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it.

Quoted 11 lines
---
 sound/soc/ti/davinci-evm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/ti/davinci-evm.c +0 -0
index 105e56ab9cdc..b043a0070d20 100644

sound/soc/ti/davinci-evm.c static void evm_shutdown(struct snd_pcm_substream *substream) · line 52

Quoted 9 lines
sound/soc/ti/davinci-evm.c +1 -2
@@ -46,8 +46,7 @@ static void evm_shutdown(struct snd_pcm_substream *substream)
 	struct snd_soc_card_drvdata_davinci *drvdata =
 		snd_soc_card_get_drvdata(soc_card);
 
-	if (drvdata->mclk)
-		clk_disable_unprepare(drvdata->mclk);
+	clk_disable_unprepare(drvdata->mclk);
 }
 
 static int evm_hw_params(struct snd_pcm_substream *substream,

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

maintainer
#2 lore raw
In reply to Xu Wang
Quoted 2 lines · Xu Wang

Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: ti: davinci-evm: Remove redundant null check before clk_disable_unprepare

      commit: ff3cfccba4dd87bb89ca185b58b38b9a74260138

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark