[alsa-devel] [PATCH 4/4] ASoC: soc core allow machine driver to register the card

Koul, Vinod vinod.koul at intel.com
Fri Jan 14 12:25:47 CET 2011


> > > 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.

Agreed, but on the other hand if someone is using register api they should
not be creating the device, so probe shouldn't be called at all.
We can leave this check. What do you think?

~Vinod



More information about the Alsa-devel mailing list