From: Christian Engelmayer Date: Sun, 13 Apr 2014 17:56:36 +0000 (+0200) Subject: ASoC: Intel: Fix incorrect sizeof() in sst_hsw_stream_get_volume() X-Git-Tag: v3.16-rc1~12^2~52^2~3^3~26 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=f3046f86b8a455ae55b8d465cd34938006361096;p=~emulex%2Finfiniband.git 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c index f46bb4ddde6..455a1857c44 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; }