提交 e57690b1 编写于 作者: V Vinod Koul 提交者: Takashi Iwai

ALSA: hdac: Fix size allocation for ext device allocation

While creating hdac_ext_device, we used hdev for sizeof insteadof
edev, which resulted in eventual crash of the system Fix the size
here

Fixes: a512f561 ('ALSA: hdac: add hdac extended device')
Reported-by: NSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 a3b3a9db
......@@ -139,7 +139,7 @@ int snd_hdac_ext_bus_device_init(struct hdac_ext_bus *ebus, int addr)
char name[15];
int ret;
edev = kzalloc(sizeof(*hdev), GFP_KERNEL);
edev = kzalloc(sizeof(*edev), GFP_KERNEL);
if (!edev)
return -ENOMEM;
hdev = &edev->hdac;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册