Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5095223ybv; Tue, 11 Feb 2020 09:05:12 -0800 (PST) X-Google-Smtp-Source: APXvYqxyskmS9nePZkk87Vkz/bPmIxoBZ5YjHFaPDIhTqUMN+tW9sbRwiKzKkXPj5+ek3kYm9hzi X-Received: by 2002:a9d:6e02:: with SMTP id e2mr6091672otr.194.1581440712773; Tue, 11 Feb 2020 09:05:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581440712; cv=none; d=google.com; s=arc-20160816; b=vUcmggcUcoFjMkaAWtArMdqn477sE5D69xYDw3uJTyABIbBydSKfXM8LNg7vEhZSTK 84rKwmNh7kNK8/qjPSJs8Znhq+OkBg07H/4a8IM7Lei4JlM1B/9qLwNNaXaBz7m1QLrt j2BG8Qsn9CjxhChOcPQ048eVce5A1ABoe7EE0sYYTEolY3oYg0bfNmH0a/4e6XQALC4C ZVzByqddfYQ2yCGG5nBzTRVOt2WFd5sOEo3t2FWsq0WtvIYKvm/6balmu3GjozpShkk9 G6m85nnJK6cr/4LET5uV12KVwPH100/xQRwT69lLjIDsNx92UAhInJaOf3K19nBq/UKi x3qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:in-reply-to:subject:cc:to:from :date; bh=jg2itKrAj0Cv1bPdVeWfgdG15ZRFPHEOB5fc5+L/Q4I=; b=O8PKMDikx/bZpISXpADIU+8aI6nQBE171wIU2JtZv6oUycIHMxTaYD9whmc8pIV8dD 0G3aqjixxYOV7KJW+OEfbL8lErMxHQlllhc07d8cuF15jV7JRkTvf9KLWkoLu4NZuvuJ 5O/zb0MqWkxT9JftRYUHTurOk3qcshOnMg8T1UB262xBbun3qofCbLpQ2NXNSH4t67cm eBIJauboVNFPw5cxp98a+84GEV8Mo1Yob5hzGWhUzGewofC8k/rjuy+X+wvt2m91aoAG tstZIZg8nSpexuemz6sI/KApAVQteKYRFMvDsS545um9J3bbDQxxfhZvvY69e7Jqzb3p 9C5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7si2388780otk.73.2020.02.11.09.04.53; Tue, 11 Feb 2020 09:05:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730550AbgBKPtp (ORCPT + 99 others); Tue, 11 Feb 2020 10:49:45 -0500 Received: from foss.arm.com ([217.140.110.172]:48652 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730534AbgBKPtn (ORCPT ); Tue, 11 Feb 2020 10:49:43 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7843713A1; Tue, 11 Feb 2020 07:49:43 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F2AF73F68E; Tue, 11 Feb 2020 07:49:42 -0800 (PST) Date: Tue, 11 Feb 2020 15:49:41 +0000 From: Mark Brown To: Olivier Moysan Cc: alexandre.torgue@st.com, alsa-devel@alsa-project.org, broonie@kernel.org, Etienne Carriere , lgirdwood@gmail.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Mark Brown , mcoquelin.stm32@gmail.com, olivier.moysan@st.com, perex@perex.cz, tiwai@suse.com Subject: Applied "ASoC: stm32: sai: manage error when getting reset controller" to the asoc tree In-Reply-To: <20200203100814.22944-2-olivier.moysan@st.com> Message-Id: X-Patchwork-Hint: ignore Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ASoC: stm32: sai: manage error when getting reset controller has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.7 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 028476c861e3eb660d8d104ef39fccb34c04a0d5 Mon Sep 17 00:00:00 2001 From: Olivier Moysan Date: Mon, 3 Feb 2020 11:08:09 +0100 Subject: [PATCH] ASoC: stm32: sai: manage error when getting reset controller Return an error when the SAI driver fails to get a reset controller. Also add an error trace, except on probe defer status. Signed-off-by: Etienne Carriere Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20200203100814.22944-2-olivier.moysan@st.com Signed-off-by: Mark Brown --- sound/soc/stm/stm32_sai.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c index e20267504b16..b824ba6cb028 100644 --- a/sound/soc/stm/stm32_sai.c +++ b/sound/soc/stm/stm32_sai.c @@ -197,12 +197,16 @@ static int stm32_sai_probe(struct platform_device *pdev) return sai->irq; /* reset */ - rst = devm_reset_control_get_exclusive(&pdev->dev, NULL); - if (!IS_ERR(rst)) { - reset_control_assert(rst); - udelay(2); - reset_control_deassert(rst); + rst = devm_reset_control_get_optional_exclusive(&pdev->dev, NULL); + if (IS_ERR(rst)) { + if (PTR_ERR(rst) != -EPROBE_DEFER) + dev_err(&pdev->dev, "Reset controller error %ld\n", + PTR_ERR(rst)); + return PTR_ERR(rst); } + reset_control_assert(rst); + udelay(2); + reset_control_deassert(rst); /* Enable peripheral clock to allow register access */ ret = clk_prepare_enable(sai->pclk); -- 2.20.1