From: Alan Date: Fri, 19 Feb 2016 06:12:32 +0000 (+0530) Subject: ASoC: Intel: Skylake: fix pointer scaling X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=65b4bcb82967fd5a60694c3477e58a04a9170aea;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ASoC: Intel: Skylake: fix pointer scaling skl_tplg_tlv_control_set does pointer maths on data but forgets that data is not uint8_t so the maths is already scaled in the pointer type. Signed-off-by: Alan Cox Signed-off-by: Vinod Koul Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c index 4624556f486d..b77c253394d7 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c @@ -950,7 +950,7 @@ static int skl_tplg_tlv_control_set(struct snd_kcontrol *kcontrol, return -EFAULT; } else { if (copy_from_user(ac->params, - data + 2 * sizeof(u32), size)) + data + 2, size)) return -EFAULT; }