[alsa-devel] [PATCH] ASoC: dapm: Fix NULL pointer dereference when registering card with widgets

Lars-Peter Clausen lars at metafoo.de
Fri Oct 3 15:26:24 CEST 2014


On 10/03/2014 02:32 PM, Jarkko Nikula wrote:
> Commit 0bd2ac3dae74 ("ASoC: Remove CODEC pointer from snd_soc_dapm_context")
> introduced regression to snd_soc_dapm_new_controls() when registering a card
> with card->dapm_widgets set. Call chain is:
>
>      snd_soc_register_card()
>      -> snd_soc_instantiate_card()
>         -> snd_soc_dapm_new_controls()
>            -> snd_soc_dapm_new_control()
>
> Null pointer dereference occurs since card->dapm context doesn't have
> associated component. Fix this by setting widget codec pointer
> conditionally.
>
> Signed-off-by: Jarkko Nikula <jarkko.nikula at linux.intel.com>

Thanks. Stupid mistake.

Acked-by: Lars-Peter Clausen <lars at metafoo.de>


More information about the Alsa-devel mailing list