Skip to content

Commit

Permalink
ASoC: Don't use wm8994->control_data in wm8994_readable_register()
Browse files Browse the repository at this point in the history
The field is no longer initialised so this will crash if running on
wm8958.

Reported-by: Thomas Abraham <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Cc: [email protected]
  • Loading branch information
broonie committed Nov 4, 2011
1 parent 86f14df commit 8eeea52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static int wm8994_retune_mobile_base[] = {
static int wm8994_readable(struct snd_soc_codec *codec, unsigned int reg)
{
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
struct wm8994 *control = wm8994->control_data;
struct wm8994 *control = codec->control_data;

switch (reg) {
case WM8994_GPIO_1:
Expand Down

0 comments on commit 8eeea52

Please sign in to comment.