Skip to content

Commit

Permalink
ASoC: Fix register cache initialisation for WM8753
Browse files Browse the repository at this point in the history
The wrong register cache variable was being used to provide the size for
the memcpy(), resulting in a copy of only a void * of data.

Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
  • Loading branch information
Mark Brown committed Jul 3, 2009
1 parent da9ff1f commit 1df892c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/wm8753.c
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,7 @@ static int wm8753_register(struct wm8753_priv *wm8753)
codec->reg_cache = &wm8753->reg_cache;
codec->private_data = wm8753;

memcpy(codec->reg_cache, wm8753_reg, sizeof(codec->reg_cache));
memcpy(codec->reg_cache, wm8753_reg, sizeof(wm8753->reg_cache));
INIT_DELAYED_WORK(&codec->delayed_work, wm8753_work);

ret = wm8753_reset(codec);
Expand Down

0 comments on commit 1df892c

Please sign in to comment.