Commit 11175556 authored by Wei Yongjun's avatar Wei Yongjun Committed by Takashi Iwai

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: 7edf3b5e ("ALSA: usb-audio: AudioStreaming Power Domain parsing")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 93ce1b12
......@@ -1037,7 +1037,7 @@ snd_usb_get_audioformat_uac3(struct snd_usb_audio *chip,
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment