From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933782AbcIQBeu (ORCPT ); Fri, 16 Sep 2016 21:34:50 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:33606 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752117AbcIQBek (ORCPT ); Fri, 16 Sep 2016 21:34:40 -0400 From: Wei Yongjun To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Arnaud Pouliquen , Moise Gergaud Cc: Wei Yongjun , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH -next] ASoC: sti: fix missing clk_disable_unprepare() on error in uni_player_start() Date: Sat, 17 Sep 2016 01:34:33 +0000 Message-Id: <1474076073-9569-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Yongjun Fix the missing clk_disable_unprepare() before return from uni_player_start() in the error handling case. Signed-off-by: Wei Yongjun --- 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.