From: Dan Carpenter <dan.carpenter@oracle.com>
To: lrg@ti.com
Cc: alsa-devel@alsa-project.org
Subject: Re: ASoC: dpcm: Add debugFS support for DPCM
Date: Sun, 29 Apr 2012 16:51:25 +0300 [thread overview]
Message-ID: <20120429135125.GA19737@elgon.mountain> (raw)
Hello Liam Girdwood,
The patch f86dcef87b77: "ASoC: dpcm: Add debugFS support for DPCM"
from Apr 25, 2012, leads to the following Smatch warning:
sound/soc/soc-core.c:1221 soc_post_component_init()
error: potential null derefence 'dai_link'.
1143 static int soc_post_component_init(struct snd_soc_card *card,
1144 struct snd_soc_codec *codec,
1145 int num, int dailess)
1146 {
1147 struct snd_soc_dai_link *dai_link = NULL;
1148 struct snd_soc_aux_dev *aux_dev = NULL;
1149 struct snd_soc_pcm_runtime *rtd;
1150 const char *temp, *name;
1151 int ret = 0;
1152
1153 if (!dailess) {
1154 dai_link = &card->dai_link[num];
^^^^^^^^
dai_link is only set sometimes; it depends on dailess.
1155 rtd = &card->rtd[num];
1156 name = dai_link->name;
1157 } else {
1158 aux_dev = &card->aux_dev[num];
1159 rtd = &card->rtd_aux[num];
1160 name = aux_dev->name;
1161 }
[snip]
1219 #ifdef CONFIG_DEBUG_FS
1220 /* add DPCM sysfs entries */
1221 if (!dai_link->dynamic)
^^^^^^^^^^
Smatch complains about this.
1222 goto out;
1223
1224 ret = soc_dpcm_debugfs_add(rtd);
1225 if (ret < 0)
1226 dev_err(rtd->dev, "asoc: failed to add dpcm sysfs entries: %d\n", ret);
1227
1228 out:
1229 #endif
regards,
dan carpenter
next reply other threads:[~2012-04-29 13:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-29 13:51 Dan Carpenter [this message]
2012-04-30 10:05 ` ASoC: dpcm: Add debugFS support for DPCM Liam Girdwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120429135125.GA19737@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.