mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: avs: Add error handling in avs_tplg_parse_initial_configs
@ 2024-11-22  6:32 Zhu Jun
  2024-11-22 11:05 ` Markus Elfring
  2024-11-22 11:10 ` Cezary Rojewski
  0 siblings, 2 replies; 3+ messages in thread
From: Zhu Jun @ 2024-11-22  6:32 UTC (permalink / raw)
  To: perex; +Cc: tiwai, zhujun2, linux-sound, linux-kernel

Introduce error handling in avs_tplg_parse_initial_configs to ensure that
the function returns immediately if parse_dictionary_entries fails.

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
---
 sound/soc/intel/avs/topology.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/avs/topology.c b/sound/soc/intel/avs/topology.c
index 5cda52702..3f76581af 100644
--- a/sound/soc/intel/avs/topology.c
+++ b/sound/soc/intel/avs/topology.c
@@ -1500,7 +1500,6 @@ static int avs_tplg_parse_initial_configs(struct snd_soc_component *comp,
 				      AVS_TKN_MANIFEST_NUM_INIT_CONFIGS_U32);
 	if (ret)
 		return ret;
-
 	block_size -= le32_to_cpu(tuples->size);
 	/* With header parsed, move on to parsing entries. */
 	tuples = avs_tplg_vendor_array_next(tuples);
@@ -1522,6 +1521,8 @@ static int avs_tplg_parse_initial_configs(struct snd_soc_component *comp,
 					       AVS_TKN_MOD_INIT_CONFIG_ID_U32,
 					       mod_init_config_parsers,
 					       ARRAY_SIZE(mod_init_config_parsers));
+		if (ret)
+			return ret;
 
 		block_size -= esize;
 
-- 
2.17.1




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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-22  6:32 [PATCH] ASoC: Intel: avs: Add error handling in avs_tplg_parse_initial_configs Zhu Jun
2024-11-22 11:05 ` Markus Elfring
2024-11-22 11:10 ` Cezary Rojewski

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

all inboxes | Powered by JetHome®