summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorChristian Engelmayer <cengelma@gmx.at>2014-04-13 21:56:36 +0400
committerMark Brown <broonie@linaro.org>2014-04-18 20:11:16 +0400
commitbf657d2479d179a03668cd7ab8aec96415592f02 (patch)
treebd7558f455d5acafccc01a36bff24335fea3b9ba /sound
parent7897ab78f64008a81344af9fecec6527dbab7a31 (diff)
downloadlinux-bf657d2479d179a03668cd7ab8aec96415592f02.tar.xz
ASoC: Intel: Fix incorrect sizeof() in sst_hsw_stream_get_volume()
Fix an incorrect sizeof() usage in sst_hsw_stream_get_volume(). sst_dsp_read() is called to read into a variable of type u32, but is passed sizeof(u32 *) for argument 'size_t bytes'. Detected by Coverity: CID 1195260. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/intel/sst-haswell-ipc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c
index 4ed2d1706a83..50e4246d4b57 100644
--- a/sound/soc/intel/sst-haswell-ipc.c
+++ b/sound/soc/intel/sst-haswell-ipc.c
@@ -991,7 +991,8 @@ int sst_hsw_stream_get_volume(struct sst_hsw *hsw, struct sst_hsw_stream *stream
return -EINVAL;
sst_dsp_read(hsw->dsp, volume,
- stream->reply.volume_register_address[channel], sizeof(volume));
+ stream->reply.volume_register_address[channel],
+ sizeof(*volume));
return 0;
}