diff mbox series

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

Message ID 20201029082513.28233-1-vulab@iscas.ac.cn
State Accepted
Commit ff3cfccba4dd87bb89ca185b58b38b9a74260138
Headers show
Series ASoC: ti: davinci-evm: Remove redundant null check before clk_disable_unprepare | expand

Commit Message

Xu Wang Oct. 29, 2020, 8:25 a.m. UTC
Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 sound/soc/ti/davinci-evm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Peter Ujfalusi Nov. 2, 2020, 8:18 a.m. UTC | #1
On 29/10/2020 10.25, Xu Wang wrote:
> Because clk_disable_unprepare() already checked NULL clock parameter,
> so the additional check is unnecessary, just remove it.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
> ---
>  sound/soc/ti/davinci-evm.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti/davinci-evm.c
> index 105e56ab9cdc..b043a0070d20 100644
> --- a/sound/soc/ti/davinci-evm.c
> +++ b/sound/soc/ti/davinci-evm.c
> @@ -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
diff mbox series

Patch

diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti/davinci-evm.c
index 105e56ab9cdc..b043a0070d20 100644
--- a/sound/soc/ti/davinci-evm.c
+++ b/sound/soc/ti/davinci-evm.c
@@ -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,