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 <dan.carpenter@linaro.org> Cc: Stable@vger.kernel.org Fixes: 36ad9bf ("ASoC: qdsp6: audioreach: add topology support") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20250825101247.152619-2-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1f52119 commit 4dda55d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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)