Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1df892cb authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: Fix register cache initialisation for WM8753



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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
parent da9ff1f7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);