Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2197083iof; Tue, 7 Jun 2022 22:55:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWktR+nZcHuV+cjwDXkPW4i0G9egRpWsz2oeuDZzuHje08MERYKjLu6x4Cc/07oIPqytii X-Received: by 2002:a17:902:e752:b0:165:1282:8d56 with SMTP id p18-20020a170902e75200b0016512828d56mr32956167plf.48.1654667743018; Tue, 07 Jun 2022 22:55:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654667743; cv=none; d=google.com; s=arc-20160816; b=TLwjgRgUxGh79s1nPytpwbNuC3iwyUpXy8Su2NGLf0vWPTC/FZ7VsmgNatcbNXiaKx DxCar+OgNM7ATXDdC8sX5+pn4QLDr0ptBv28ulPouXMsy6hgbwIaVufLQpLosPd1XT4m wWKsdjWDtBwblaNKhvyK4zys7V3E93wgBHHzG01KDf3rIdrOpqoLAqruzel6Y51ZT6XF mFDMtWJHbPIhdj7ThGIL9XQN6MabuLWyW3ViCHA5SoH9S+Q2cs+QPGqh5HHQHIkpjrjq mEoJs8nx2ocBVYB/lIaA8bIrjKPwjNIhMIrU3zCM6KS7Su+U6nfE6xGx0v9c/zIyYCdj 3B4g== 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=BW5bC9mm5brKr31w8KBV85Y2eLGBKeUPSKIX85yYFRz7BJfRE/wb+XwSKRy/dgjFFx 3f6j6WI0zQ634rjPiSF6ZOepy549Hme+CUDYgVsDgYf8IojXc3e62wB0htWSGeQf1Rrw +gFzkYKSReUTyOnkuC+paUI8E3zr2esBQs+gAU7Jsngr49dnt9IlEow90IpZ5jpznxtE BjOoX/IhURdApahQqxIYnpcDMgmMF0n48tL6oURKjGQUiy9F3CNCsJCjuUJTZlwZyEy6 j+VT1N5yJlxHtclVW7KLualFy7Oo3bp0iZ7rLAMu6Ve3PnCTaBot6TV1fA7zat4Q3zQT APKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FFzNbwQy; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c33-20020a634e21000000b003c6184913b4si26598802pgb.5.2022.06.07.22.55.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:55:43 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FFzNbwQy; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4C4D94B0C63; Tue, 7 Jun 2022 22:22:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1392362AbiFHBAP (ORCPT + 99 others); Tue, 7 Jun 2022 21:00:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381950AbiFGVtW (ORCPT ); Tue, 7 Jun 2022 17:49:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A19D823B56E; Tue, 7 Jun 2022 12:08:31 -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 B8B7E618D6; Tue, 7 Jun 2022 19:08:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3AF1C385A5; Tue, 7 Jun 2022 19:08:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628910; bh=CzrLO3e2CgEOzWZRssCzwztDRtE5eWvfjtuaGMykLwI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FFzNbwQyy5blLW7aj37u9JnjJJ3fz6Y1MXWai06/UZiB6oKqUDKhkpsk/2FcpuGIC K+t8MfPsSLWJbbu5LKuiR+5NG+9eqvhc2feBPBPU34G8nML4GU5CZqYM0ONHSLJAZS MFiookLv9IIuF8hgafzSBbtJiqtdmIO1B8FRL6Qw= 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.18 498/879] ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition() Date: Tue, 7 Jun 2022 19:00:16 +0200 Message-Id: <20220607165017.327978425@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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