mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
ASoC: qcom: audioreach: fix potential null pointer dereference
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: 36ad9bf1d9 ("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>
This commit is contained in:
committed by
Mark Brown
parent
e49c93e151
commit
8318e04ab2
@@ -607,8 +607,8 @@ static int audioreach_widget_load_module_common(struct snd_soc_component *compon
|
||||
return PTR_ERR(cont);
|
||||
|
||||
mod = audioreach_parse_common_tokens(apm, cont, &tplg_w->priv, w);
|
||||
if (IS_ERR(mod))
|
||||
return PTR_ERR(mod);
|
||||
if (IS_ERR_OR_NULL(mod))
|
||||
return mod ? PTR_ERR(mod) : -ENODEV;
|
||||
|
||||
mod->data = audioreach_get_module_priv_data(&tplg_w->priv);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user