linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] sound:soc: fix return value check in imx_audmux_suspend
@ 2023-07-17 14:51 Yuanjun Gong
  2023-07-21  8:40 ` Shengjiu Wang
  0 siblings, 1 reply; 6+ messages in thread
From: Yuanjun Gong @ 2023-07-17 14:51 UTC (permalink / raw)
  To: Yuanjun Gong, Shengjiu Wang, Xiubo Li, Fabio Estevam,
	linuxppc-dev

check the return value of clk_prepare_enable, and if
clk_prepare_enable got an unexpected return value,
imx_audmux_suspend should return the error value.

Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
---
 sound/soc/fsl/imx-audmux.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index be003a117b39..962b6baf0a34 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -325,8 +325,11 @@ static void imx_audmux_remove(struct platform_device *pdev)
 static int imx_audmux_suspend(struct device *dev)
 {
 	int i;
+	ssize_t ret;
 
-	clk_prepare_enable(audmux_clk);
+	ret = clk_prepare_enable(audmux_clk);
+	if (ret)
+		return ret;
 
 	for (i = 0; i < reg_max; i++)
 		regcache[i] = readl(audmux_base + i * 4);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-07-28 13:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17 14:51 [PATCH 1/1] sound:soc: fix return value check in imx_audmux_suspend Yuanjun Gong
2023-07-21  8:40 ` Shengjiu Wang
2023-07-22 12:36   ` [PATCH v2 1/1] ASoC: imx-audmux: fix return value checks of clk_prepare_enable() Yuanjun Gong
2023-07-22 12:40     ` Fabio Estevam
2023-07-25  1:47       ` [PATCH v3 " Yuanjun Gong
2023-07-28  4:29     ` [PATCH v2 " Shengjiu Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).