aboutsummaryrefslogtreecommitdiffstats
path: root/sound/hda
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2015-08-23 02:22:49 -0400
committerTakashi Iwai <tiwai@suse.de>2015-08-23 03:43:25 -0400
commite57690b1aeb208642d00f9b378830b26c9585caf (patch)
tree1ea5260e48fc3c9d88cb464fb7fc5e55be1b05ae /sound/hda
parenta3b3a9db5d26bef1e62054c95c3d7701de5110d5 (diff)
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>
Diffstat (limited to 'sound/hda')
-rw-r--r--sound/hda/ext/hdac_ext_bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/hda/ext/hdac_ext_bus.c b/sound/hda/ext/hdac_ext_bus.c
index 8544e4fb1cd3..4449d1a99089 100644
--- a/sound/hda/ext/hdac_ext_bus.c
+++ b/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)
139 char name[15]; 139 char name[15];
140 int ret; 140 int ret;
141 141
142 edev = kzalloc(sizeof(*hdev), GFP_KERNEL); 142 edev = kzalloc(sizeof(*edev), GFP_KERNEL);
143 if (!edev) 143 if (!edev)
144 return -ENOMEM; 144 return -ENOMEM;
145 hdev = &edev->hdac; 145 hdev = &edev->hdac;