From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "Koul, Vinod" <vinod.koul@intel.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"Harsha, Priya" <priya.harsha@intel.com>,
"Bensaid, Selma" <selma.bensaid@intel.com>,
"lrg@slimlogic.co.uk" <lrg@slimlogic.co.uk>
Subject: Re: [PATCH 4/4] ASoC: soc core allow machine driver to register the card
Date: Fri, 14 Jan 2011 10:52:24 +0000 [thread overview]
Message-ID: <20110114105224.GA13256@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <438BB0150E931F4B9CE701519A4463010844672180@bgsmsx502.gar.corp.intel.com>
On Fri, Jan 14, 2011 at 09:54:59AM +0530, Koul, Vinod wrote:
> > > + /* no card, so machine driver is registering card */
> > > + if (!card)
> > > + return 0;
> > > +
> > I'll review this one more closely tomorrow - as I said with the combined
> > patch I'd not expect the soc-audio device to be involved when the
> > machine driver is registering a card so I'd like to understand in more
> > detail why this is still required.
> If someone is still creating soc-audio device and not adding the drvdata the
> code following this will use a null pointer :(. So tried to protect, but again
> if people are doing right, then this shouldn't be invoked at all
If that's all it is then the check should be changed to return -EINVAL
or similar as this is an error which prevents the device being
instantiated. It shouldn't pretend it succeeded, and not doing so will
save us having to check in any of the other functions.
next prev parent reply other threads:[~2011-01-14 10:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-13 17:19 [PATCH 4/4] ASoC: soc core allow machine driver to register the card Koul, Vinod
2011-01-13 23:41 ` Mark Brown
2011-01-14 0:17 ` ALSA driver fails to creat ControlC1 and others Philip Chu
2011-01-14 8:31 ` Takashi Iwai
2011-01-18 16:37 ` Philip Chu
2011-01-14 4:24 ` [PATCH 4/4] ASoC: soc core allow machine driver to register the card Koul, Vinod
2011-01-14 10:52 ` Mark Brown [this message]
2011-01-14 11:25 ` Koul, Vinod
2011-01-14 11:37 ` Mark Brown
2011-01-14 13:52 ` Koul, Vinod
-- strict thread matches above, loose matches on Subject: below --
2011-01-14 13:52 Koul, Vinod
2011-01-17 13:45 ` Liam Girdwood
2011-01-17 13:57 ` Mark Brown
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=20110114105224.GA13256@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@slimlogic.co.uk \
--cc=priya.harsha@intel.com \
--cc=selma.bensaid@intel.com \
--cc=vinod.koul@intel.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;
as well as URLs for NNTP newsgroup(s).