Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1144cf7a authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman
Browse files

[PATCH] USB: kzalloc in ldusb



another one for kzalloc

Signed-off-by: default avatarOliver Neukum <oliver@neukum.name>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 092e462a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);