alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ASoC: Intel: Skylake: fix pointer scaling
@ 2016-02-19  6:12 Vinod Koul
  2016-02-19  6:12 ` [PATCH 2/3] ASoC: Intel: Skylake: remove bogus comparison of an array with NULL Vinod Koul
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Vinod Koul @ 2016-02-19  6:12 UTC (permalink / raw)
  To: alsa-devel
  Cc: Alan, patches.audio, liam.r.girdwood, Vinod Koul, broonie,
	Alan Cox

From: Alan <gnomes@lxorguk.ukuu.org.uk>

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 <alan@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/intel/skylake/skl-topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index ba0d02d1613e..22a9e6fe1c05 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -1111,7 +1111,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;
 		}
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-02-22  4:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-19  6:12 [PATCH 1/3] ASoC: Intel: Skylake: fix pointer scaling Vinod Koul
2016-02-19  6:12 ` [PATCH 2/3] ASoC: Intel: Skylake: remove bogus comparison of an array with NULL Vinod Koul
2016-02-22  4:58   ` Applied "ASoC: Intel: Skylake: remove bogus comparison of an array with NULL" to the asoc tree Mark Brown
2016-02-19  6:12 ` [PATCH 3/3] ASoC: Intel: Skylake: Generate topology name for NHLT table header Vinod Koul
2016-02-20 17:16   ` Applied "ASoC: Intel: Skylake: Generate topology name for NHLT table header" to the asoc tree Mark Brown
2016-02-19 15:33 ` [PATCH 1/3] ASoC: Intel: Skylake: fix pointer scaling Mark Brown
2016-02-21  3:04   ` Vinod Koul
2016-02-22  3:16     ` Mark Brown
2016-02-22  3:33       ` Vinod Koul
2016-02-20 17:16 ` Applied "ASoC: Intel: Skylake: fix pointer scaling" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).