Skip to content

Commit

Permalink
ASoC: Intel: Fix incorrect sizeof() in sst_hsw_stream_get_volume()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian Engelmayer authored and Mark Brown committed Apr 18, 2014
1 parent 7897ab7 commit bf657d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/soc/intel/sst-haswell-ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit bf657d2

Please sign in to comment.