The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] ASoC: samsung: i2s: Remove redundant null check before clk_disable_unprepare
@ 2020-10-29  8:37 Xu Wang
  2020-10-29 18:36 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Xu Wang @ 2020-10-29  8:37 UTC (permalink / raw)
  To: krzk, sbkim73; +Cc: linux-kernel

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/samsung/i2s.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index df53d4ea808f..36969f0a3f9a 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -1212,8 +1212,7 @@ static int i2s_runtime_suspend(struct device *dev)
 	priv->suspend_i2scon = readl(priv->addr + I2SCON);
 	priv->suspend_i2spsr = readl(priv->addr + I2SPSR);
 
-	if (priv->op_clk)
-		clk_disable_unprepare(priv->op_clk);
+	clk_disable_unprepare(priv->op_clk);
 	clk_disable_unprepare(priv->clk);
 
 	return 0;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: samsung: i2s: Remove redundant null check before clk_disable_unprepare
  2020-10-29  8:37 [PATCH] ASoC: samsung: i2s: Remove redundant null check before clk_disable_unprepare Xu Wang
@ 2020-10-29 18:36 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2020-10-29 18:36 UTC (permalink / raw)
  To: Xu Wang; +Cc: sbkim73, linux-kernel

On Thu, Oct 29, 2020 at 08:37:15AM +0000, Xu Wang wrote:
> Because clk_disable_unprepare() already checked NULL clock parameter,
> so the additional check is unnecessary, just remove it.

You missed other places with it - the resume part.

Best regards,
Krzysztof

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-29 18:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-29  8:37 [PATCH] ASoC: samsung: i2s: Remove redundant null check before clk_disable_unprepare Xu Wang
2020-10-29 18:36 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox