]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
ASoC: soc-core: Fix null pointer dereference
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Tue, 7 Dec 2010 16:30:38 +0000 (16:30 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 8 Dec 2010 13:55:17 +0000 (13:55 +0000)
commite4f078d8c0790e94e09af975ca0b870e2f050e17
treed7f8d21cdafc44f5a529a6aca2805a8f74132ffe
parent5a4cfce73b7b48bdbb4e816124e5fcf84bc58e59
ASoC: soc-core: Fix null pointer dereference

In case the codec driver did not provide a read/write function,
codec->driver->read|write will be NULL.  Ensure that we use the one
specified in codec->read|write to avoid oopsing when we access
the debugfs entries.  This is achieved by using snd_soc_read() and
snd_soc_write().

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-core.c