Skip to content

Commit 4dda55d

Browse files
Srinivas Kandagatlagregkh
authored andcommitted
ASoC: qcom: audioreach: fix potential null pointer dereference
commit 8318e04 upstream. It is possible that the topology parsing function audioreach_widget_load_module_common() could return NULL or an error pointer. Add missing NULL check so that we do not dereference it. Reported-by: Dan Carpenter <[email protected]> Cc: [email protected] Fixes: 36ad9bf ("ASoC: qdsp6: audioreach: add topology support") Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1f52119 commit 4dda55d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/qcom/qdsp6/topology.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,8 @@ static int audioreach_widget_load_module_common(struct snd_soc_component *compon
587587
return PTR_ERR(cont);
588588

589589
mod = audioreach_parse_common_tokens(apm, cont, &tplg_w->priv, w);
590-
if (IS_ERR(mod))
591-
return PTR_ERR(mod);
590+
if (IS_ERR_OR_NULL(mod))
591+
return mod ? PTR_ERR(mod) : -ENODEV;
592592

593593
dobj = &w->dobj;
594594
dobj->private = mod;

0 commit comments

Comments
 (0)