ASoC: tlv320aic3x: Fix null pointer dereference when pdata is not set
authorJarkko Nikula <jhnikula@gmail.com>
Sun, 5 Sep 2010 16:10:22 +0000 (19:10 +0300)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Mon, 6 Sep 2010 10:36:22 +0000 (11:36 +0100)
commitc776357e0adc2a25bd22eb75155030132c88a0dd
tree917edb0d57554a9a1a68ab471c41cdbede3617af
parent098b1718230466b48f2027eb26cdc921760ae5da
ASoC: tlv320aic3x: Fix null pointer dereference when pdata is not set

Null pointer dereference will occur from *setup = pdata->setup if pdata
is not set. Fix this by moving assignments from pdata inside non-null case.

Thanks to Jiri Slaby <jirislaby@gmail.com> for noticing.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
sound/soc/codecs/tlv320aic3x.c