Skip to content

Commit 70e1e5f

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 f617d51 commit 70e1e5f

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
@@ -586,8 +586,8 @@ static int audioreach_widget_load_module_common(struct snd_soc_component *compon
586586
return PTR_ERR(cont);
587587

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

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

0 commit comments

Comments
 (0)