alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ASoC: sti: fix missing clk_disable_unprepare() on error in uni_player_start()
@ 2016-09-17  1:34 Wei Yongjun
  2016-09-19  7:27 ` Arnaud Pouliquen
  2016-09-21 12:56 ` Applied "ASoC: sti: fix missing clk_disable_unprepare() on error in uni_player_start()" to the asoc tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2016-09-17  1:34 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Arnaud Pouliquen, Moise Gergaud
  Cc: Wei Yongjun, alsa-devel, linux-kernel

From: Wei Yongjun <weiyongjun1@huawei.com>

Fix the missing clk_disable_unprepare() before return
from uni_player_start() in the error handling case.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 sound/soc/sti/uniperif_player.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sti/uniperif_player.c b/sound/soc/sti/uniperif_player.c
index 645e415..1bc8ebc 100644
--- a/sound/soc/sti/uniperif_player.c
+++ b/sound/soc/sti/uniperif_player.c
@@ -893,8 +893,10 @@ static int uni_player_start(struct uniperif *player)
 	SET_UNIPERIF_SOFT_RST_SOFT_RST(player);
 
 	ret = reset_player(player);
-	if (ret < 0)
+	if (ret < 0) {
+		clk_disable_unprepare(player->clk);
 		return ret;
+	}
 
 	/*
 	 * Does not use IEC61937 features of the uniperipheral hardware.

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

end of thread, other threads:[~2016-09-21 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-17  1:34 [PATCH -next] ASoC: sti: fix missing clk_disable_unprepare() on error in uni_player_start() Wei Yongjun
2016-09-19  7:27 ` Arnaud Pouliquen
2016-09-21 12:56 ` Applied "ASoC: sti: fix missing clk_disable_unprepare() on error in uni_player_start()" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).