1
0
Fork 0

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: 7edf3b5e6a ("ALSA: usb-audio: AudioStreaming Power Domain parsing")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
hifive-unleashed-5.1
Wei Yongjun 2018-08-02 04:31:02 +00:00 committed by Takashi Iwai
parent 93ce1b1296
commit 11175556ee
1 changed files with 1 additions and 1 deletions

View File

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