Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4776513ioa; Wed, 27 Apr 2022 10:51:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaxjeNlPE0Hf9FnS/rIz+XLAiscMkAF1F4p+qVNZnmH49Pfs2QvhzXFUld+tCGcCwMPd7O X-Received: by 2002:a17:902:9a4c:b0:158:b6f0:4aa2 with SMTP id x12-20020a1709029a4c00b00158b6f04aa2mr29851202plv.163.1651081890628; Wed, 27 Apr 2022 10:51:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651081890; cv=none; d=google.com; s=arc-20160816; b=q9AefDNspd35hsXZx6yR8GK82qnSR3QjobG3fs554rkwZiMUGvl2vURjl3PStBgOky iiCTiHm54AuiDIs1ByGVPu+nBny1IuOKDfZpyDLp2VTNSBLtnZlZkGzQ55Uho91Y0xDb Hil82GW6eGVwapcyfYKj9XistOz2DjsnhY8iRou8AafKcfvLPnmfBNsTk/bfyqdI0sN7 cBFlsZY3HE/LSGQhv7tQXlTkZMor99S+iypYLa0n/KY8GQj7dhfh2rQjI3ErLw2CjwQ5 G/jkA+2DkmE2K/IW6QKHqDsbmnfNFEdnu6AsMxRpbvWX/nHWM0pE/JHn3Mu+CFoKCvLA jDYw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=P52XUlnvWCDbdpSO0eow56ta8BYIoktLvffWsEefpbg=; b=xbQBywQozyomB/5v5OR1K19/6yj2rMJr3Dqh+pq9GNjGPNQBB1pt6xPvUh5jMYPa0l VoqU1fs6HU4ixDi/zQY/1Xp3Mi9TTo4p2X5/QC18E81SwSPZ6ccbTP0MaLCZBLtPVtqK UwxWyBX9gB2skLNRcYhzGNXFdEqjBFqq95YHWhzcU0lxjmJDPk86iINUJlizayN2YFwN kGF4jw60RItbSkyeJCa1xhTVTdZlJacGcqQtVIY0f1bCRaj/qdJMylTmFr6kBdq3Vw4K 5Aq2KCbNn/TFSJFqXjf1bvAq4yR+C2HLswuiYzWKpXisflDXOiys8IBRjneZsRB5pCUT iwBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EYyIJudD; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h2-20020a17090adb8200b001bed39e61cesi2359541pjv.23.2022.04.27.10.51.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 10:51:30 -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=@gmail.com header.s=20210112 header.b=EYyIJudD; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BA45554F9E; Wed, 27 Apr 2022 10:25:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236946AbiD0R2N (ORCPT + 99 others); Wed, 27 Apr 2022 13:28:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232736AbiD0R2L (ORCPT ); Wed, 27 Apr 2022 13:28:11 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1762152E5F for ; Wed, 27 Apr 2022 10:25:00 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id gh6so4862802ejb.0 for ; Wed, 27 Apr 2022 10:24:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P52XUlnvWCDbdpSO0eow56ta8BYIoktLvffWsEefpbg=; b=EYyIJudDhVOE7nkfQP1R77baA7wbkc6ve+j0cW06+oPnAeLrfHkIPvjhM8VSs9RP54 WUrZl2qV8Hp9WrdgrHudUuNOmQAsSwugxTKF0zdZhb98lU01+kJ0uTZZHDnfHo23KF8f 7vJtUWbeJBZ48O+Rcz70/expiyA/HgPVGjOqzUyb1HzVmRkKPtKel1pAC8TrwJeDHSMa FR7WouWdsXS4BTgy5cayvj6E92lge1vx0YVkzM6lujQbbz75L2BvdPJnKRJVjEZyZTx5 j8y1AT6+O7co6I6cll+Za0mbqMSTkEYbhG2ewGuphRI4UjAVKzM2+G71/z2L2pwD7pCt Lhrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P52XUlnvWCDbdpSO0eow56ta8BYIoktLvffWsEefpbg=; b=OEB9owtn/uQPU6RhQnO1QiGCnebYWPqKTuAniN+iOHJsu27pPJRuyKLydIbYLJu3FW w0YpRoABbucO4GPm1MgbmGa3U5siTbiX2VyKS6YnAQcSldXOB0l/iqGI0V7jv/SLAS+s CTGLa19fVAAqka9VZsn52qkfy0Y4SHx4F+UlONJUdlzxvr7OEnwrItZC7hiJR7jLuyBc I7lakKkl/ND+2F8chAnpkaIQZDfk9tdyctsDkZI+XSshzg1a8ta2AoUvDQI2gtnKl/3E TRnnL7zudesn0AW06IZ7CCISWP5hqnuojgQftYGl3JlWUfcnX2pFaCAoB3kLGEWB3ove w7Dg== X-Gm-Message-State: AOAM530pGQG94Sf8NggMlVQx/zHsLLoNJCHubz1XRzhTRRVigqElrS07 yQVrp02eHAu/XZ0HAFT5eYg= X-Received: by 2002:a17:907:97c9:b0:6db:ab53:1fdf with SMTP id js9-20020a17090797c900b006dbab531fdfmr27725391ejc.406.1651080298559; Wed, 27 Apr 2022 10:24:58 -0700 (PDT) Received: from localhost.localdomain (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id z2-20020a05640235c200b00425fff78dbbsm3328443edc.49.2022.04.27.10.24.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 10:24:57 -0700 (PDT) From: Nicolas Frattaroli To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Katsuhiro Suzuki Cc: Nicolas Frattaroli , linux-rockchip@lists.infradead.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: rk3328: fix disabling mclk on pclk probe failure Date: Wed, 27 Apr 2022 19:23:11 +0200 Message-Id: <20220427172310.138638-1-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 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 --- 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.36.0