[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 05:24:59 CET 2011


> > @@ -1870,6 +1868,10 @@ static int soc_probe(struct platform_device *pdev)
> >  	struct snd_soc_card *card = platform_get_drvdata(pdev);
> >  	int ret = 0;
> >
> > +	/* 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

~Vinod


More information about the Alsa-devel mailing list