From patchwork Fri Mar 31 03:01:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13197280 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E7717C76196 for ; Sun, 2 Apr 2023 08:12:27 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8792D3E7; Sun, 2 Apr 2023 10:11:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8792D3E7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1680423142; bh=udJiExzXvkUf8xe+fLZrl3zvwqp+aF09gR8rkvNOPTw=; h=To:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From:Reply-To:Cc:From; b=lRTnQD01UABmKI6wN8sCXrCYfE9Yv3CbdTkLCfSokBiw3U8Q9MlA3pZRBZa51V49i gsxqwwojjyV5QHfwv7LpjdLWPm63+YVeQ78KpsSFQRJZUQWUULFU7rTy3gf1HqPeTC TYRHq/9sjyDM+OrbTroh8Cmtv9KoVN/N1vK3dP+I= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id EB718F8052D; Sun, 2 Apr 2023 10:11:31 +0200 (CEST) To: Ban Tao , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Philipp Zabel Subject: [PATCH] ASoC: sunxi: handle reset_control_deassert() error Date: Fri, 31 Mar 2023 11:01:16 +0800 X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 X-Mailman-Approved-At: Sun, 02 Apr 2023 08:07:49 +0000 X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <168042309035.26.12759717015715603472@mailman-core.alsa-project.org> X-Patchwork-Original-From: Yangtao Li via Alsa-devel From: Yangtao Li Reply-To: Yangtao Li Cc: Yangtao Li , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Content-Disposition: inline Add error check for reset_control_deassert(). Signed-off-by: Yangtao Li --- sound/soc/sunxi/sun50i-dmic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/sunxi/sun50i-dmic.c b/sound/soc/sunxi/sun50i-dmic.c index 069c993acb31..7f0e63130d95 100644 --- a/sound/soc/sunxi/sun50i-dmic.c +++ b/sound/soc/sunxi/sun50i-dmic.c @@ -345,7 +345,11 @@ static int sun50i_dmic_probe(struct platform_device *pdev) if (IS_ERR(host->rst)) return dev_err_probe(&pdev->dev, PTR_ERR(host->rst), "Failed to get reset.\n"); - reset_control_deassert(host->rst); + ret = reset_control_deassert(host->rst); + if (ret) { + dev_err(&pdev->dev, "failed to deassert reset: %d\n", ret); + return ret; + } ret = devm_snd_soc_register_component(&pdev->dev, &sun50i_dmic_component, &sun50i_dmic_dai, 1);