diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-12-08 08:53:22 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-12-16 19:23:59 +0000 |
commit | e8bc3c99fa982f616e74aec4445945400a9c56f3 (patch) | |
tree | c6da4b7776110b2e0e5e8e288a59a61edc297e61 /sound/soc/intel/skylake | |
parent | db4e561378b539230feb4db5e7d5d548c2db2cd4 (diff) |
ASoC: Intel: Skylake: pointer math issue
"data" is a u32 pointer so this copies the information to wrong place
entirely.
Fixes: 140adfba5280 ('ASoC: Intel: Skylake: Add tlv byte kcontrols')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/skylake')
-rw-r--r-- | sound/soc/intel/skylake/skl-topology.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c index b824450edcb4..34f2f7351f66 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c @@ -919,9 +919,9 @@ static int skl_tplg_tlv_control_get(struct snd_kcontrol *kcontrol, if (bc->params) { if (copy_to_user(data, &bc->param_id, sizeof(u32))) return -EFAULT; - if (copy_to_user(data + sizeof(u32), &size, sizeof(u32))) + if (copy_to_user(data + 1, &size, sizeof(u32))) return -EFAULT; - if (copy_to_user(data + 2 * sizeof(u32), bc->params, size)) + if (copy_to_user(data + 2, bc->params, size)) return -EFAULT; } |