diff options
author | Jarkko Nikula <[email protected]> | 2014-10-03 15:32:40 +0300 |
---|---|---|
committer | Mark Brown <[email protected]> | 2014-10-03 15:39:19 +0100 |
commit | b2d9de549c30170eed5691d369cf16680e0ce03a (patch) | |
tree | 7de459e18dda0ac4f4a032222d246bd245f0f939 /tools/perf/util/trace-event-scripting.c | |
parent | 0bd2ac3dae74ee25c5ea171cb572731c7a89c248 (diff) |
ASoC: dapm: Fix NULL pointer dereference when registering card with widgets
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 <[email protected]>
Acked-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions