diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2018-08-02 07:31:02 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-08-02 08:26:37 +0300 |
commit | 11175556eec58b27a1398e80f8b1302314f2242c (patch) | |
tree | b511d3cac1240e7afc3ff7e54c0c0e1ba954fd7d /sound/usb/stream.c | |
parent | 93ce1b12966d9d60ee5583ffbde822a22909568e (diff) | |
download | linux-11175556eec58b27a1398e80f8b1302314f2242c.tar.xz |
ALSA: usb-audio: Fix invalid use of sizeof in parse_uac_endpoint_attributes()
sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.
Fixes: 7edf3b5e6a45 ("ALSA: usb-audio: AudioStreaming Power Domain parsing")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/stream.c')
-rw-r--r-- | sound/usb/stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/stream.c b/sound/usb/stream.c index 8fe3b0e00e45..67cf849aa16b 100644 --- a/sound/usb/stream.c +++ b/sound/usb/stream.c @@ -1037,7 +1037,7 @@ found_clock: fp->rate_max = UAC3_BADD_SAMPLING_RATE; fp->rates = SNDRV_PCM_RATE_CONTINUOUS; - pd = kzalloc(sizeof(pd), GFP_KERNEL); + pd = kzalloc(sizeof(*pd), GFP_KERNEL); if (!pd) { kfree(fp->rate_table); kfree(fp); |