Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp973914pxb; Wed, 6 Apr 2022 05:46:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9rkKdRzh3STuLHRAeBqDaLZBclPhIUKL3HArOe27KeaIvcJWFAVxdtEshVDXCVFwDex5a X-Received: by 2002:a17:90a:c484:b0:1ca:8896:5db9 with SMTP id j4-20020a17090ac48400b001ca88965db9mr9617473pjt.143.1649249165859; Wed, 06 Apr 2022 05:46:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649249165; cv=none; d=google.com; s=arc-20160816; b=leTCcIiZOoDLb6hwkvsf96QZwgVRom6l/3sPPRHXUypbkkI3eaVe8CxUsa3HqEGELs UM9lZ8fLg7Gvc/gXDSeyURIY5bI1yWCn/tHnlDZ9KscOkNCB0MbghjAYHJ+Q/5UCNBsx 3W+oTEFkGpFseTA1PaeDKkJxY4RYXnFzge+CtT1lwk5QVi0oj+lED0IiKAmcid/YFIdz EB4euk/LST0bET1DH2pmMI/bHq0AzfKxeyeN7fGbbqL1AazJ+mJKMBAL7OLOrzoYNFds EAJuAgzwGNRplLiaNt2xwF/IiysV8lxvuykqTNonaXhs+Y1AxzoeCVK3JbAuUE1AqTU2 zmIg== 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=xZ5CPiN7zLvXxd0I2OGu1MbMoGXASEsA2hMcFSVPSFHzzQNT/2S2m8jW5FqRBVvNMk 7FwRXEi3ZmvQdMB/GuQhXV3USxyi7xzKpAvEosc/DrKG4LVsUix+2qKzUEb3EcYQ2ety poqw8OgLm8Z6obUIo64V0pkq2JJX3kuH3C4lnbthWFHfd69mb+5WLvswtJqmqEHQHeS9 I+GuV2skc4hvhlKVyGL20IpYsZZYJDcCuOQ7NzszfCv+JymB/QnoLxDDS+DTX7NnlQZo mPV+t2i17y26FQK2OGof8mMp7fVyg8+8skoIS1oRnz5OmX63kVDfwp0MGkao9VSPt5oO tjLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ULvlNA4M; 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 c6-20020a170903234600b00153b2d165ecsi16848828plh.500.2022.04.06.05.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:46:05 -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=ULvlNA4M; 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 544E83DBB21; Wed, 6 Apr 2022 02:23:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380909AbiDEVhc (ORCPT + 99 others); Tue, 5 Apr 2022 17:37:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348321AbiDEJrb (ORCPT ); Tue, 5 Apr 2022 05:47:31 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A0C96C49E; Tue, 5 Apr 2022 02:33:42 -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 81520B81C86; Tue, 5 Apr 2022 09:33:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9196C385A0; Tue, 5 Apr 2022 09:33:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151221; bh=4CbGFM1Lbe8DmiPQBMYFTnVQIyjT1+Fi1scJt5CW+h8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ULvlNA4MPJhFVp9bD5bEM8mi94vTwT9o0Ogaj/HNlNVvZEU8VsbzsphU8LPFIYCrs PvgjAheyZ1Jbqm/WfeHLw2pdLjQsTJ3tJfDPpUHU6pJEBOpPvgRuTO6FkrJh3Cczfx 3igQ3ngxin6F3Jce07UqS/cGhcZK+kYMROpdc1z0= 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.15 338/913] ASoC: mxs-saif: Handle errors for clk_enable Date: Tue, 5 Apr 2022 09:23:20 +0200 Message-Id: <20220405070349.980719157@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-2.0 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=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 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