]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ASoC: Intel: Fix incorrect sizeof() in sst_hsw_stream_get_volume()
authorChristian Engelmayer <cengelma@gmx.at>
Sun, 13 Apr 2014 17:56:36 +0000 (19:56 +0200)
committerMark Brown <broonie@linaro.org>
Fri, 18 Apr 2014 16:11:16 +0000 (17:11 +0100)
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>
sound/soc/intel/sst-haswell-ipc.c

index 4ed2d1706a8333f528cf42dfe4e357da0375160e..50e4246d4b57a2df8c9ad0c54deabb4e346ca572 100644 (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;
 }