Skip to content

Commit

Permalink
msm: usbaudio: Fix memory allocation for USB audio module init
Browse files Browse the repository at this point in the history
Fix memory allocation issue in snd_usb_audio_init()
use sizeof(struct) insead of sizeof(pointer)

Change-Id: I270bbd7111e97dd4e0e92378f61d5025e16f5fca
Signed-off-by: Alex Fradkin <afradkin@codeaurora.org>
  • Loading branch information
Alex Fradkin authored and Gerrit Code Review committed Oct 9, 2013
1 parent e3e9432 commit da53d46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/usb/card.c
Expand Up @@ -736,7 +736,7 @@ static int __init snd_usb_audio_init(void)
return -EINVAL;
}

usbaudiosdev = kzalloc(sizeof(usbaudiosdev), GFP_KERNEL);
usbaudiosdev = kzalloc(sizeof(*usbaudiosdev), GFP_KERNEL);
usbaudiosdev->name = "usb_audio_class";

err = switch_dev_register(usbaudiosdev);
Expand Down

0 comments on commit da53d46

Please sign in to comment.