Hi,

another for kzalloc.

        Regards
                Oliver

Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]>

--- linux-2.6.15-vanilla/drivers/usb/misc/phidgetservo.c        2006-01-03 
04:21:10.000000000 +0100
+++ linux-2.6.15/drivers/usb/misc/phidgetservo.c        2006-01-06 
21:49:31.000000000 +0100
@@ -252,12 +252,11 @@
        struct usb_device *udev = interface_to_usbdev(interface);
        struct phidget_servo *dev;
 
-       dev = kmalloc(sizeof (struct phidget_servo), GFP_KERNEL);
+       dev = kzalloc(sizeof (struct phidget_servo), GFP_KERNEL);
        if (dev == NULL) {
                dev_err(&interface->dev, "%s - out of memory\n", __FUNCTION__);
                return -ENOMEM;
        }
-       memset(dev, 0x00, sizeof (*dev));
 
        dev->udev = usb_get_dev(udev);
        dev->type = id->driver_info;


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to