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>
This commit is contained in:
Christian Engelmayer 2014-04-13 19:56:36 +02:00 committed by Mark Brown
parent c9eaa447e7
commit f3046f86b8
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}