[PATCH] USB: kzalloc in usbled
another one for kzalloc.
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/usb/misc/usbled.c b/drivers/usb/misc/usbled.c
index 877b081..f441964 100644
--- a/drivers/usb/misc/usbled.c
+++ b/drivers/usb/misc/usbled.c
@@ -106,12 +106,11 @@
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);