[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230331030116.54136-1-frank.li@vivo.com>
Date: Fri, 31 Mar 2023 11:01:16 +0800
From: Yangtao Li <frank.li@...o.com>
To: Ban Tao <fengzheng923@...il.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>,
Philipp Zabel <p.zabel@...gutronix.de>
Cc: Yangtao Li <frank.li@...o.com>, alsa-devel@...a-project.org,
linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: [PATCH] ASoC: sunxi: handle reset_control_deassert() error
Add error check for reset_control_deassert().
Signed-off-by: Yangtao Li <frank.li@...o.com>
---
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);
--
2.35.1
Powered by blists - more mailing lists