From: gsantosh@codeaurora.org
To: alsa-devel@alsa-project.org
Cc: Mark Brown <broonie@kernel.org>, lgirdwood@gmail.com
Subject: Question on fe_dai_open
Date: Fri, 18 Jul 2014 12:11:46 -0000 [thread overview]
Message-ID: <24f2c41bc1a9ac326b94ef14ce1bb1bf.squirrel@www.codeaurora.org> (raw)
Hi All,
In the following function
dpcm_fe_dai_open
Why the code is proceeding further if dpcm_path_get returns zero,
if dpcm_path_get returns zero implies there is no vaild path setup.
technically we should return from the function when there is no valid path
setup, still we proceed further de-referencing the pointer at the exit of
this function through dpcm_path_put(&list);
please let me know why we are not returning when dpcm_path_get returns zero.
static int dpcm_fe_dai_open(struct snd_pcm_substream *fe_substream)
{
....
if (dpcm_path_get(fe, stream, &list) <= 0) {
dev_dbg(fe->dev, "ASoC: %s no valid %s route\n",
fe->dai_link->name, stream ? "capture" :
"playback");
/*we need to return if there is no vaild paths available*/
}
....
dpcm_path_put(&list);
}
Regards
Santosh M G
next reply other threads:[~2014-07-18 12:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-18 12:11 gsantosh [this message]
2014-07-19 13:14 ` Question on fe_dai_open gsantosh
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=24f2c41bc1a9ac326b94ef14ce1bb1bf.squirrel@www.codeaurora.org \
--to=gsantosh@codeaurora.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox