Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3643841pxm; Tue, 1 Mar 2022 02:30:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKS9hl9XySofuozkOwab/g4JEo1IUW3mSFSTMFHvbvwChOFN1cNjexGnU/qF2y9x8qjwgG X-Received: by 2002:a05:6402:d6e:b0:410:8169:46de with SMTP id ec46-20020a0564020d6e00b00410816946demr23541465edb.328.1646130645388; Tue, 01 Mar 2022 02:30:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646130645; cv=none; d=google.com; s=arc-20160816; b=W5GOoky23odonJuY9iJWuAj06ImUmbZUOon3qsWeYIxj/jBKMCmWRkXCkqol3IHGgi AuBeFFafwQrlMHwIaQUZzTgwZbVbd86vNUJ//77cgrZG+w+K3wu5gvuwG6vwZbGdMfH1 g27ITvvcSw9urr5fg9f+sVCcE/so1Gc8Oq90M8DQDQmnnnQr+ZCOTkZzFn+yC+ye58fb QFB/ScFVQhZFWXD7xdoDvqe3+PcmvNXlNCfSRhhHlXsCbksO1Dp+Ta5NOOYgzl7sofcD eH0JmG9UIMHOF68b2fumfdCyPId9ipthQDa3OSx+uC2t6uvxKltJRybmn+Rrg/0vw2Kc nriQ== 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; bh=syEYtt8V+In7fg8/F54A/1UGfcSVc1IjGkTCtCdiK0E=; b=AerQqs2lFxcfawV5syDwZhSmPqo7eabzbBYisS6494mlVDqxcmJEQyMiCavU+UqlDZ +2h2nyxgNW86kSGQ68udA9ABjakniKKGjD/lx5rnHncDslvOuYMAFPbPcV4UkLmMwO/Y gCED5Wdx6ccdXlq+HyNgxIHdC8ncou4VTjEV0FvWTw00c0U3xveYjII6Ugn3kwFhfhS5 panqwqHD1EjkAbxNByUTOoVWoy/a/0jezfTn4xdgRz2MtQnqbvWrycVBi60xmsFVehec yuZwv3NhavY2s1p7y4xZ+tcKMw3fqM9ujvPCSm0Qv5ayWksbrZ1qIQkjoEsfrLlSoJ0Y ax7Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j1-20020a170906094100b006cedc0f913fsi7019663ejd.385.2022.03.01.02.30.21; Tue, 01 Mar 2022 02:30:45 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233319AbiCAISa (ORCPT + 99 others); Tue, 1 Mar 2022 03:18:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233322AbiCAIS1 (ORCPT ); Tue, 1 Mar 2022 03:18:27 -0500 Received: from cstnet.cn (smtp21.cstnet.cn [159.226.251.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 623DCBCBB for ; Tue, 1 Mar 2022 00:17:44 -0800 (PST) Received: from localhost.localdomain (unknown [124.16.138.126]) by APP-01 (Coremail) with SMTP id qwCowABXX8eP1h1iVVHwAQ--.63688S2; Tue, 01 Mar 2022 16:17:20 +0800 (CST) From: Jiasheng Jiang To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, Julia.Lawall@inria.fr Cc: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jiasheng Jiang Subject: [PATCH] ASoC: mxs-saif: Handle errors for clk_enable Date: Tue, 1 Mar 2022 16:17:17 +0800 Message-Id: <20220301081717.3727190-1-jiasheng@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: qwCowABXX8eP1h1iVVHwAQ--.63688S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Xr47tF18GF17Kry8Gw1UGFg_yoWfXrc_ta 92kw4DZrWYvFZa9r1DJr4DAr40gwsrAw1rWa4FqrnxtFyfJF13urZFqrZxur90vr1vvFyf GryjvrZ7ArW29jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbxkFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_ Cr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s 0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xII jxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr 1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7M4IIrI8v6xkF7I0E8cxa n2IY04v7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrV AFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCI c40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267 AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_Wr1j6rW3Jr1lIxAIcVC2z280aVAFwI0_ Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUb XdbUUUUUU== X-Originating-IP: [124.16.138.126] X-CM-SenderInfo: pmld2xxhqjqxpvfd2hldfou0/ X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,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 As the potential failure of the clk_enable(), it should be better to check it, like mxs_saif_trigger(). Fixes: d0ba4c014934 ("ASoC: mxs-saif: set a base clock rate for EXTMASTER mode work") Signed-off-by: Jiasheng Jiang --- sound/soc/mxs/mxs-saif.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index 6a2d24d48964..879c1221a809 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -455,7 +455,10 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream, * basic clock which should be fast enough for the internal * logic. */ - clk_enable(saif->clk); + ret = clk_enable(saif->clk); + if (ret) + return ret; + ret = clk_set_rate(saif->clk, 24000000); clk_disable(saif->clk); if (ret) -- 2.25.1