From: Vinod Koul Date: Sun, 23 Aug 2015 06:22:49 +0000 (+0530) Subject: ALSA: hdac: Fix size allocation for ext device allocation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e57690b1aeb208642d00f9b378830b26c9585caf;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai --- 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) char name[15]; int ret; - edev = kzalloc(sizeof(*hdev), GFP_KERNEL); + edev = kzalloc(sizeof(*edev), GFP_KERNEL); if (!edev) return -ENOMEM; hdev = &edev->hdac;