Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp632287iog; Mon, 13 Jun 2022 09:31:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vyDWtPmzFsiv+OyaYK9Kh1mf74+PiVmAo4Y83tpFK92+wqdOK1ri51IFCtzIlVR4NYML7T X-Received: by 2002:a17:902:ce81:b0:167:6117:f91a with SMTP id f1-20020a170902ce8100b001676117f91amr406640plg.167.1655137899324; Mon, 13 Jun 2022 09:31:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655137899; cv=none; d=google.com; s=arc-20160816; b=Hrj7WsC8kccXKzM3JI486HcIH7/Cw4S27SjCVKxK7mG8grhafIK+gXKYD4/wiYJBk7 XIY5wSTorjJ1QD+oSBXH1LeXOk6wUfIeIa7e9UU2aUiG0JSFlXNFs/iftkbO18JHwZqS lJJwsI7tLynksInt8+IO/Bkv9LdrMxsk+E2DFkXBRqEtRy1vJ4GVZvO0NrAhynI9A6tf Ums3m5d5w+Q11ZEs+Sc4chthDbxdLLMGxFWpPrWihhhGKC1DhQ91szRV4bL7vr+jNPa9 0VvFsyDVMOhuIXE5nxkL2LAeGZRLfVqMmjVS7FHcEG4vw9K7NToBSSRd6KMYPfYclpJT ywMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IdmMFnEPDSSQ8Sb4y867F4f8s9nnQ7qfJrvHpHE/30g=; b=RlAppqBIap1vrLPJwpLWG/SRCIHNJCUi0Bfmp5McvFD+hDKl/pABxdXMXHvBJf4n1i 2w9kZt7A46hdga/d4AS+9kZ184YhApYhcEoNlreNOI2K3UQEYwz0kied33Qgj47oVG1h rsfH03R501vupanf6w7hVdAoMwhVApBnGpzEDbJH1S7vNU9wkC9LUF0dujQAMWxxbyk8 oCOhZpwC0538ld/k+wRHMWG8e16w9J/+vfibtcy64eSp58NhXl7SO4GIG33n6jhsVhu+ Oub4bvgRdul2tuRg5NPJ02Jc65tm6JRNvtaL+/vNCIcpM1rMaHff351aQi55iz06qmmZ pPBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ayynaUiZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c13-20020a170903234d00b00163a54d2612si11713893plh.418.2022.06.13.09.31.26; Mon, 13 Jun 2022 09:31:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ayynaUiZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352724AbiFMLVv (ORCPT + 99 others); Mon, 13 Jun 2022 07:21:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353638AbiFMLQI (ORCPT ); Mon, 13 Jun 2022 07:16:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3481238BC7; Mon, 13 Jun 2022 03:38:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C59E4611AD; Mon, 13 Jun 2022 10:38:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB778C34114; Mon, 13 Jun 2022 10:38:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655116719; bh=CzrLO3e2CgEOzWZRssCzwztDRtE5eWvfjtuaGMykLwI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ayynaUiZzNCWRKFOImHZsYHOUGzsiEVDf2DjAhdSYr8CJvpH3dRT7iu59cDgIAQMu JeAgfjYHhvYeAeGNfOJsyNWodnZqGinrLO4NI7S9mcojFaV5Pktjzli9ngMR1KjgSl RuDYNANo2vByRwY/ADgkyZX5xmD5HbFnD/ZhgA9o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yang Yingliang , Charles Keepax , Mark Brown , Sasha Levin Subject: [PATCH 5.4 148/411] ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition() Date: Mon, 13 Jun 2022 12:07:01 +0200 Message-Id: <20220613094933.105232877@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094928.482772422@linuxfoundation.org> References: <20220613094928.482772422@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yang Yingliang [ Upstream commit be2af740e2a9c7134f2d8ab4f104006e110b13de ] Fix the missing clk_disable_unprepare() before return from wm2000_anc_transition() in the error handling case. Fixes: 514cfd6dd725 ("ASoC: wm2000: Integrate with clock API") Signed-off-by: Yang Yingliang Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20220514091053.686416-1-yangyingliang@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wm2000.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c index 72e165cc6443..97ece3114b3d 100644 --- a/sound/soc/codecs/wm2000.c +++ b/sound/soc/codecs/wm2000.c @@ -536,7 +536,7 @@ static int wm2000_anc_transition(struct wm2000_priv *wm2000, { struct i2c_client *i2c = wm2000->i2c; int i, j; - int ret; + int ret = 0; if (wm2000->anc_mode == mode) return 0; @@ -566,13 +566,13 @@ static int wm2000_anc_transition(struct wm2000_priv *wm2000, ret = anc_transitions[i].step[j](i2c, anc_transitions[i].analogue); if (ret != 0) - return ret; + break; } if (anc_transitions[i].dest == ANC_OFF) clk_disable_unprepare(wm2000->mclk); - return 0; + return ret; } static int wm2000_anc_set_mode(struct wm2000_priv *wm2000) -- 2.35.1