All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] ASoC: qcom: audioreach: add support for static calibration
@ 2025-08-22  8:07 Dan Carpenter
  2025-08-22  8:40 ` Srinivas Kandagatla
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-08-22  8:07 UTC (permalink / raw)
  To: Srinivas Kandagatla; +Cc: linux-sound

Hello Srinivas Kandagatla,

Commit c7ed4c2debfd ("ASoC: qcom: audioreach: add support for static
calibration") from Aug 19, 2025 (linux-next), leads to the following
Smatch static checker warning:

	sound/soc/qcom/qdsp6/topology.c:613 audioreach_widget_load_module_common()
	error: potential NULL/IS_ERR bug 'mod'

sound/soc/qcom/qdsp6/topology.c
    591 static int audioreach_widget_load_module_common(struct snd_soc_component *component,
    592                                                 int index, struct snd_soc_dapm_widget *w,
    593                                                 struct snd_soc_tplg_dapm_widget *tplg_w)
    594 {
    595         struct q6apm *apm = dev_get_drvdata(component->dev);
    596         struct audioreach_container *cont;
    597         struct audioreach_sub_graph *sg;
    598         struct audioreach_module *mod;
    599         struct snd_soc_dobj *dobj;
    600 
    601         sg = audioreach_parse_sg_tokens(apm, &tplg_w->priv);
    602         if (IS_ERR(sg))
    603                 return PTR_ERR(sg);
    604 
    605         cont = audioreach_parse_cont_tokens(apm, sg, &tplg_w->priv);
    606         if (IS_ERR(cont))
    607                 return PTR_ERR(cont);
    608 
    609         mod = audioreach_parse_common_tokens(apm, cont, &tplg_w->priv, w);
    610         if (IS_ERR(mod))
    611                 return PTR_ERR(mod);

The audioreach_parse_common_tokens() can return either error pointers or
NULL.

    612 
--> 613         mod->data = audioreach_get_module_priv_data(&tplg_w->priv);
                ^^^^^^^^^
Only checked for error pointers, and it could still be NULL

    614 
    615         dobj = &w->dobj;
    616         dobj->private = mod;
    617 
    618         return 0;
    619 }

regards,
dan carpenter

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

end of thread, other threads:[~2025-08-22  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-22  8:07 [bug report] ASoC: qcom: audioreach: add support for static calibration Dan Carpenter
2025-08-22  8:40 ` Srinivas Kandagatla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.