aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2006-01-06 16:44:52 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:54 -0500
commit06d694748b5173d972d7e4169173adad62ee67c0 (patch)
treebbc923c4bb49afc95daca72fb72306a0fe32ab34
parentd874a2bade6eec21abb30d4822d7b3e43cfbae95 (diff)
[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>
-rw-r--r--drivers/usb/misc/usbled.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/misc/usbled.c b/drivers/usb/misc/usbled.c
index 877b081a3a6e..f441964132c0 100644
--- a/drivers/usb/misc/usbled.c
+++ b/drivers/usb/misc/usbled.c
@@ -106,12 +106,11 @@ static int led_probe(struct usb_interface *interface, const struct usb_device_id
106 struct usb_led *dev = NULL; 106 struct usb_led *dev = NULL;
107 int retval = -ENOMEM; 107 int retval = -ENOMEM;
108 108
109 dev = kmalloc(sizeof(struct usb_led), GFP_KERNEL); 109 dev = kzalloc(sizeof(struct usb_led), GFP_KERNEL);
110 if (dev == NULL) { 110 if (dev == NULL) {
111 dev_err(&interface->dev, "Out of memory\n"); 111 dev_err(&interface->dev, "Out of memory\n");
112 goto error; 112 goto error;
113 } 113 }
114 memset (dev, 0x00, sizeof (*dev));
115 114
116 dev->udev = usb_get_dev(udev); 115 dev->udev = usb_get_dev(udev);
117 116