Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp573846iog; Mon, 13 Jun 2022 08:23:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx22RJ02/B+dJjGpRuQYB4IlEDDfxTJBGs1NAKrDs09RRPbLEMJLr11pLlv2GoYDL7OwG58 X-Received: by 2002:a17:907:6e25:b0:711:c6ce:b7bc with SMTP id sd37-20020a1709076e2500b00711c6ceb7bcmr355414ejc.752.1655133835372; Mon, 13 Jun 2022 08:23:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655133835; cv=none; d=google.com; s=arc-20160816; b=JGM30W7moAN1oynYKzt66ips/Ebbv6lnn2RGzj3tgqu5nFfmJt8s8wPRdiDzeRRRKX LAFn/g+crzqw3e7RmctctTN9UK1qerAG8q31927zPqQxPeUUFzcsNxHO1mHGI3DFcwI9 BYWIWiVjzYH/Qg9O+/pLsDg0c/ShmGbN7a1sp4wCCirzzDNkptlzbp3M43UTgr3+fkGu 8ht47rCFUCNLkN5lHybAiTMVXprLpBaNTiqSO5dF47ZCA6X84M3iqOZDAv2+OVbgqrqk w2BFSviHzhHV1YpCRaGZiaWZNJ29mwkc9evfCSVLH9Np83EP4UpE/zjBOf8x+GS+o6PB GKcQ== 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=r95iZrKKPIdrCb/9HC0SMuKOANr2QLhvvgS16MGKK2g=; b=DIpydNxKDIFKu4H++jawgHmfvEKC6EDLgVjkqiz8OPgbaGI/ZBEUnqce1UhP3a3VqE RKs6J+8wt9MOZK0+9d08N//mlb307EtU4yonELGdA8HYAYKgBCSbZVU6CuTmeJyl7IT/ FDjrcy1/7O9INwm0AhaBkub7iaZoR2WU00vORUEKw6wH6LynLaYWv/GHmAl/ZI2bLaX2 c7B9wYqgoZWpLPwiX3kfp+JvOLoyz6Tl0wk9muM0kscNvI3oiEZf1lNdf2jzmt5ZDycu DerVAGD+xBEhwz/oSYVG6psLimLCRG1nMrQWyCSujg/H5qEUmgQpPmpezIUzkAAQ1Nqb v6sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=s+mFsPDz; 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 h8-20020a50ed88000000b004316c8ba451si7524905edr.488.2022.06.13.08.23.28; Mon, 13 Jun 2022 08:23:55 -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=s+mFsPDz; 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 S1344816AbiFMKsH (ORCPT + 99 others); Mon, 13 Jun 2022 06:48:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348367AbiFMKoQ (ORCPT ); Mon, 13 Jun 2022 06:44:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25FE623BD7; Mon, 13 Jun 2022 03:25:21 -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 ams.source.kernel.org (Postfix) with ESMTPS id 44863B80E90; Mon, 13 Jun 2022 10:25:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BE74C3411C; Mon, 13 Jun 2022 10:25:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115918; bh=hj2J+v5j3ZFbQEu6MDUIKw3/kjjkro8X6Gww229V7K4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s+mFsPDzQyzZ40CNszwg5kmWI+kx0xqRc29uzfY7nzBprrl2MCUuX53+5z4y7btD9 TNsXHpm4+hAv5BoJJmxPbc9p5mca76/kh9Q8lG+jl9QNKg4RK8E9P2WvR0W7eAse86 Em4pagAcRPnlwp6CQfjQ+KLMoC9Rws7+8UJ36OnA= 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 4.14 078/218] ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition() Date: Mon, 13 Jun 2022 12:08:56 +0200 Message-Id: <20220613094922.823991808@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094908.257446132@linuxfoundation.org> References: <20220613094908.257446132@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 23cde3a0dc11..73cda3c2a861 100644 --- a/sound/soc/codecs/wm2000.c +++ b/sound/soc/codecs/wm2000.c @@ -545,7 +545,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; @@ -575,13 +575,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