Browse Source

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: a512f5611646 ('ALSA: hdac: add hdac extended device')
Reported-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Vinod Koul 10 years ago
parent
commit
e57690b1ae
1 changed files with 1 additions and 1 deletions
  1. 1 1
      sound/hda/ext/hdac_ext_bus.c

+ 1 - 1
sound/hda/ext/hdac_ext_bus.c

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