diff options
Diffstat (limited to 'drivers/usb/misc/phidgetservo.c')
-rw-r--r-- | drivers/usb/misc/phidgetservo.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/misc/phidgetservo.c b/drivers/usb/misc/phidgetservo.c index b3418d2bcc69..5a040c205eed 100644 --- a/drivers/usb/misc/phidgetservo.c +++ b/drivers/usb/misc/phidgetservo.c | |||
@@ -252,12 +252,11 @@ servo_probe(struct usb_interface *interface, const struct usb_device_id *id) | |||
252 | struct usb_device *udev = interface_to_usbdev(interface); | 252 | struct usb_device *udev = interface_to_usbdev(interface); |
253 | struct phidget_servo *dev; | 253 | struct phidget_servo *dev; |
254 | 254 | ||
255 | dev = kmalloc(sizeof (struct phidget_servo), GFP_KERNEL); | 255 | dev = kzalloc(sizeof (struct phidget_servo), GFP_KERNEL); |
256 | if (dev == NULL) { | 256 | if (dev == NULL) { |
257 | dev_err(&interface->dev, "%s - out of memory\n", __FUNCTION__); | 257 | dev_err(&interface->dev, "%s - out of memory\n", __FUNCTION__); |
258 | return -ENOMEM; | 258 | return -ENOMEM; |
259 | } | 259 | } |
260 | memset(dev, 0x00, sizeof (*dev)); | ||
261 | 260 | ||
262 | dev->udev = usb_get_dev(udev); | 261 | dev->udev = usb_get_dev(udev); |
263 | dev->type = id->driver_info; | 262 | dev->type = id->driver_info; |