Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2142692iof; Tue, 7 Jun 2022 21:10:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUsPV6oE77R06vh7ajCmZehWycT2vydKVYkta1/n2G2QboInpyIp66Eo2G344iI+mYzGUH X-Received: by 2002:a63:fa56:0:b0:3fc:d3d2:ceac with SMTP id g22-20020a63fa56000000b003fcd3d2ceacmr28191509pgk.99.1654661429623; Tue, 07 Jun 2022 21:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654661429; cv=none; d=google.com; s=arc-20160816; b=0Jrh+hGGvQLdIPfG2fR1YnGp6AW7YU1pegEsphKgrJchwX2ZwAvJp9XCtcd8hMh8EY jWaAwTtnc7/fkWlrLma/++44YB48nUp7wwbTDcd/deiaYbr3hWf1uOS6sNYXaYidFgI2 yUa59ktgKd8y/YTV4kdd5/3ITBplaqJn1+LBPOymJ/wD4pXK05cYITGy9pK/x4bTLmL2 7z1sIRQxYHxZHIggnksEcOKzV2mxciRlfRTzjTHsaVW22M6XIqH+VK0vVyV6LM6X2DMO 64C7OAOWjWU5fnObQwIUZn3gu43xNNAtyRCbOfwgpFhDQEgs8lrWQPYg0eFwhu7jFWbC vX6w== 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=2Exm6m3BqD0AGm3cAWs663HqcqXKrThhzy750I/qRQ8=; b=K59BmToFZisaQQpKUpW6AxyeAYm3GFNeubeXLHNeubL3Un+dZm+bf8vCY2IxgvmNvp anJAD85ABwNXE6zPZFBsr9jlsZ/KHo9Eu1c22cMh5pJbH3zNA+85N6yRrBtZQVkx9vMH HtRMnTi8emTjnpPi/SCd/e87dIZUwsfiAha+rtqXWC8JCy+WNOKKOxSWZd1t1vnup6O9 SV/BrfCbhnDTTYqUJQ3wBgUYkyLG9Zk2pOblcShdXImDvKPQ2IXl8WQfJkTgh5MNkRT1 t6laAXt2bEfvvFrVXqcliqZvf+HplH2dTccR97fB3NWRhxY9WqHUBW+FVxUnB/jl/Jcn qbQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="cIt/6TQh"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k10-20020a170902ce0a00b0016891aa0280si1829139plg.614.2022.06.07.21.10.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:10:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="cIt/6TQh"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 13A4B21AC40; Tue, 7 Jun 2022 20:41:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385124AbiFGWp3 (ORCPT + 99 others); Tue, 7 Jun 2022 18:45:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354538AbiFGV3k (ORCPT ); Tue, 7 Jun 2022 17:29:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7481152BAC; Tue, 7 Jun 2022 12:02:27 -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 6765BB82391; Tue, 7 Jun 2022 19:02:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1799C385A5; Tue, 7 Jun 2022 19:02:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628545; bh=uZOwd6s3kVhfsImudmQXu07CdvivTkI16naom/J1bL4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cIt/6TQhSxOr45Q13C9zMug5nMcpJkbjWUcRhDMuW5w74MQa63kwZu8RX7Hs1C7lQ Kkm1UReNx/sNHQ6NB56KNVH5BOBxOI406UFOnxHudZ6o+W0+K+LU8kde8kHngxWp2V +KO6T9iDCXKw/XBupiSTbVS3Vn4/8B34BzseFT2w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolas Frattaroli , Katsuhiro Suzuki , Mark Brown , Sasha Levin Subject: [PATCH 5.18 366/879] ASoC: rk3328: fix disabling mclk on pclk probe failure Date: Tue, 7 Jun 2022 18:58:04 +0200 Message-Id: <20220607165013.494505834@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: Nicolas Frattaroli [ Upstream commit dd508e324cdde1c06ace08a8143fa50333a90703 ] If preparing/enabling the pclk fails, the probe function should unprepare and disable the previously prepared and enabled mclk, which it doesn't do. This commit rectifies this. Fixes: c32759035ad2 ("ASoC: rockchip: support ACODEC for rk3328") Signed-off-by: Nicolas Frattaroli Reviewed-by: Katsuhiro Suzuki Link: https://lore.kernel.org/r/20220427172310.138638-1-frattaroli.nicolas@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/rk3328_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rk3328_codec.c b/sound/soc/codecs/rk3328_codec.c index 758d439e8c7a..86b679cf7aef 100644 --- a/sound/soc/codecs/rk3328_codec.c +++ b/sound/soc/codecs/rk3328_codec.c @@ -481,7 +481,7 @@ static int rk3328_platform_probe(struct platform_device *pdev) ret = clk_prepare_enable(rk3328->pclk); if (ret < 0) { dev_err(&pdev->dev, "failed to enable acodec pclk\n"); - return ret; + goto err_unprepare_mclk; } base = devm_platform_ioremap_resource(pdev, 0); -- 2.35.1