mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-05 18:59:58 +00:00
[PATCH] USB: kzalloc in ldusb
another one for kzalloc Signed-off-by: Oliver Neukum <oliver@neukum.name> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
092e462a53
commit
1144cf7af2
1 changed files with 1 additions and 2 deletions
|
@ -626,12 +626,11 @@ static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id *
|
|||
|
||||
/* allocate memory for our device state and intialize it */
|
||||
|
||||
dev = kmalloc(sizeof(*dev), GFP_KERNEL);
|
||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
if (dev == NULL) {
|
||||
dev_err(&intf->dev, "Out of memory\n");
|
||||
goto exit;
|
||||
}
|
||||
memset(dev, 0x00, sizeof(*dev));
|
||||
init_MUTEX(&dev->sem);
|
||||
dev->intf = intf;
|
||||
init_waitqueue_head(&dev->read_wait);
|
||||
|
|
Loading…
Reference in a new issue