mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 08:40:53 +07:00
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>
This commit is contained in:
parent
93ce1b1296
commit
11175556ee
@ -1037,7 +1037,7 @@ snd_usb_get_audioformat_uac3(struct snd_usb_audio *chip,
|
|||||||
fp->rate_max = UAC3_BADD_SAMPLING_RATE;
|
fp->rate_max = UAC3_BADD_SAMPLING_RATE;
|
||||||
fp->rates = SNDRV_PCM_RATE_CONTINUOUS;
|
fp->rates = SNDRV_PCM_RATE_CONTINUOUS;
|
||||||
|
|
||||||
pd = kzalloc(sizeof(pd), GFP_KERNEL);
|
pd = kzalloc(sizeof(*pd), GFP_KERNEL);
|
||||||
if (!pd) {
|
if (!pd) {
|
||||||
kfree(fp->rate_table);
|
kfree(fp->rate_table);
|
||||||
kfree(fp);
|
kfree(fp);
|
||||||
|
Loading…
Reference in New Issue
Block a user