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

Commit 610ceea8 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm8x16-wcd: Fix slab corruption due to incorrect malloc size"

parents 5b660a4d b0adde63
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -5218,7 +5218,9 @@ static int msm8x16_wcd_device_up(struct snd_soc_codec *codec)
		pr_debug("%s: Update ASOC cache", __func__);
		kfree(codec->reg_cache);
		codec->reg_cache = kmemdup(codec_drv->reg_cache_default,
					codec_drv->reg_word_size, GFP_KERNEL);
					   (codec_drv->reg_cache_size
					    * codec_drv->reg_word_size),
					   GFP_KERNEL);
		if (!codec->reg_cache) {
			pr_err("%s: Cache update failed!\n", __func__);
			mutex_unlock(&codec->mutex);