Skip to content

Commit

Permalink
[PATCH] USB: kzalloc in usbled
Browse files Browse the repository at this point in the history
another one for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Mar 20, 2006
1 parent d874a2b commit 06d6947
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/misc/usbled.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,11 @@ static int led_probe(struct usb_interface *interface, const struct usb_device_id
struct usb_led *dev = NULL;
int retval = -ENOMEM;

dev = kmalloc(sizeof(struct usb_led), GFP_KERNEL);
dev = kzalloc(sizeof(struct usb_led), GFP_KERNEL);
if (dev == NULL) {
dev_err(&interface->dev, "Out of memory\n");
goto error;
}
memset (dev, 0x00, sizeof (*dev));

dev->udev = usb_get_dev(udev);

Expand Down

0 comments on commit 06d6947

Please sign in to comment.