[alsa-devel] [PATCH 3/5] ASoC: rsnd: NULL check is not needed for clk_unprepare()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Tue Oct 31 01:39:17 CET 2017


From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

clk_unprepare() is checking parameter by IS_ERR_OR_NULL().
clk NULL check is not needed on rsnd_mod_quit()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
 sound/soc/sh/rcar/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 23bf313..b27112d 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -172,8 +172,7 @@ int rsnd_mod_init(struct rsnd_priv *priv,
 
 void rsnd_mod_quit(struct rsnd_mod *mod)
 {
-	if (mod->clk)
-		clk_unprepare(mod->clk);
+	clk_unprepare(mod->clk);
 	mod->clk = NULL;
 }
 
-- 
1.9.1



More information about the Alsa-devel mailing list