Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ASoC: cs35l45:Increase the error checking returned by the function.
@ 2024-11-13  8:57 liujing
  2024-11-13 13:10 ` Charles Keepax
  0 siblings, 1 reply; 2+ messages in thread
From: liujing @ 2024-11-13  8:57 UTC (permalink / raw)
  To: david.rhodes
  Cc: rf, lgirdwood, broonie, perex, tiwai, linux-sound, patches,
	linux-kernel, liujing

In cs35l45_dsp_init(), it is necessary to check
the return value of the wm_halo_init function.

Signed-off-by: liujing <liujing@cmss.chinamobile.com>

diff --git a/sound/soc/codecs/cs35l45.c b/sound/soc/codecs/cs35l45.c
index fa1d9d9151f9..c045c7c05947 100644
--- a/sound/soc/codecs/cs35l45.c
+++ b/sound/soc/codecs/cs35l45.c
@@ -1365,7 +1365,10 @@ static int cs35l45_dsp_init(struct cs35l45_private *cs35l45)
 	dsp->cs_dsp.lock_regions = 0xFFFFFFFF;
 
 	ret = wm_halo_init(dsp);
-
+	if (ret) {
+		dev_err(cs35l45->dev, "wm_halo_init failed: %d\n", ret);
+		return ret;
+	}
 	regmap_multi_reg_write(cs35l45->regmap, cs35l45_fs_errata_patch,
 						   ARRAY_SIZE(cs35l45_fs_errata_patch));
 
-- 
2.27.0




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

end of thread, other threads:[~2024-11-13 13:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-13  8:57 [PATCH] ASoC: cs35l45:Increase the error checking returned by the function liujing
2024-11-13 13:10 ` Charles Keepax

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox