[alsa-devel] [PATCH] ASoC: CX20442: fix NULL pointer dereference

Janusz Krzysztofik jkrzyszt at tis.icnet.pl
Tue Feb 1 14:18:02 CET 2011

Dnia wtorek 01 luty 2011 o 13:07:50 Dimitris Papastamos napisał(a):
> On Tue, 2011-02-01 at 13:01 +0100, Janusz Krzysztofik wrote:
> > The CX20442 codec driver never provided the snd_soc_codec_driver's
> > .reg_cache_default member. With the latest ASoC framework changes,
> > it seems to be referred unconditionally, resulting in a NULL
> > pointer dereference if missing. Provide it.
> This shouldn't happen with the latest ASoC as there is support for
> NULL default caches.  In particular the following code should be
> taking care of the NULL pointer dereference
> if (codec_drv->reg_cache_default) {
> 	codec->reg_def_copy = kmemdup(...);
> 	if (!codec->reg_def_copy) {
> 		ret = -ENOMEM;
> 		goto fail;
> 	}
> }
> If this is not what soc-core looks like for you please pull broonie's
> latest development tree.

Fine, but your fix is sitting in Mark's 'for-2.6.39' branch, while the 
CX20442 codec driver (perhaps not only this one) has been broken for 

Mark, are you going to cherry-pick Dimitris' fix to your 'for-2.6.38'?


More information about the Alsa-devel mailing list