Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e57690b1 authored by Vinod Koul's avatar Vinod Koul Committed by Takashi Iwai
Browse files

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: default avatarSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a3b3a9db
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -139,7 +139,7 @@ int snd_hdac_ext_bus_device_init(struct hdac_ext_bus *ebus, int addr)
	char name[15];
	char name[15];
	int ret;
	int ret;


	edev = kzalloc(sizeof(*hdev), GFP_KERNEL);
	edev = kzalloc(sizeof(*edev), GFP_KERNEL);
	if (!edev)
	if (!edev)
		return -ENOMEM;
		return -ENOMEM;
	hdev = &edev->hdac;
	hdev = &edev->hdac;