Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp666857pxb; Tue, 5 Apr 2022 18:00:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMCEWIzJnuDoPx2FHzRm4W0jsfCrrgs/L0tX6uSIU1hRSCeeHox7Onz6MNap2B+GLn4nUw X-Received: by 2002:a17:906:9b8f:b0:6e0:6bcb:fc59 with SMTP id dd15-20020a1709069b8f00b006e06bcbfc59mr5980767ejc.624.1649206802098; Tue, 05 Apr 2022 18:00:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649206802; cv=none; d=google.com; s=arc-20160816; b=wJBd9IkEplfX62MnT4WsHHpiKZoi51tDj8TBMdyGmvd3Ns04fd/1g/X/SlnTPCRI72 19CCRNyyhECx32VL6YwsVSu5JltWznOtN03BggUIXSimivUTOoJ0h0WLQDkaZ6WxR78L K1ub6qCx5mLND6T3Ajf5AQfeRn2+OBPQMYHzC+ueQzdN8iovgwkA73ClwVYT+Ckplr1L tiN9H+suzRXL4qwV6sx/xKi3+SoLWm2VDHm3uq9YmoiHBaDh4JTZjyHGDE8zhNwj+bPQ 9xdmVvLSipl+sLnXGVJzdmA7QXrSVi0gtPovoy3E+I6/fuQHVuNgZeNkttgYInELVaSf F0WQ== 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=e4ZCyluw8JTBc2rmu3Pl1tnl8+DUwAii44BVxnbcBEk=; b=cxvGdJuPoTQw4A5bSlN5ncNpuqjqqP1VNFSFNS6HfAIPjjr/lE4Hh+dk+Z1KOO7Uuq N/fsR8JJp6RHh3ZCFgVLQbVy629Y5EKZOSa4RXqAThUtKwWEQEOrK37IQfM9ay5i+7Me 2WGuaVzc4F1yZbKnAj21Q/0rGvvktIt7H4huU1ehOVZl3Fa6K3O8PvR8ZpHB71fwT1tn v3z8LvB46LsjVpXsieGSNp99Hp/nTVyR3XkZPyXMi4qnaOITWzvjzeeRgHLLytP2sX8a MuTBv/Nb3nspoei0QsApUEXR/Ld0x1ZXYwxnHJpb1q+XYGcriAo9cSqlgMDDGKJ5b9xc P5Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BEp9GTLp; 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 k26-20020a17090666da00b006e7cbc38c26si6501395ejp.868.2022.04.05.17.59.36; Tue, 05 Apr 2022 18:00:02 -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=BEp9GTLp; 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 S1382976AbiDEMRh (ORCPT + 99 others); Tue, 5 Apr 2022 08:17:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244947AbiDEIwt (ORCPT ); Tue, 5 Apr 2022 04:52:49 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1552024BCE; Tue, 5 Apr 2022 01:47:24 -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 sin.source.kernel.org (Postfix) with ESMTPS id 881ECCE1BF9; Tue, 5 Apr 2022 08:47:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E71FC385A0; Tue, 5 Apr 2022 08:47:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148441; bh=4CbGFM1Lbe8DmiPQBMYFTnVQIyjT1+Fi1scJt5CW+h8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BEp9GTLpYbJ/9LHeOcWLN6nIaphVbnVDJZkIJMYWJxz2v4Ep8QFtnZNhlSa4twtG6 FxzOm+5u6IGU97tsxmm0LPlDzdls1UB7WiAZdJvLnBKnBheEHZZ+RepY5r0Pi4W1FA tV37CcEoYAOyfENmgoHgl89QO9U094IqD+G7HWUk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiasheng Jiang , Mark Brown , Sasha Levin Subject: [PATCH 5.16 0359/1017] ASoC: mxs-saif: Handle errors for clk_enable Date: Tue, 5 Apr 2022 09:21:12 +0200 Message-Id: <20220405070404.941951979@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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=-7.1 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: Jiasheng Jiang [ Upstream commit 2ecf362d220317debf5da376e0390e9f7a3f7b29 ] 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 Link: https://lore.kernel.org/r/20220301081717.3727190-1-jiasheng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- 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.34.1