Skip to content

Commit

Permalink
[PATCH] USB: kzalloc in PhidgetServo
Browse files Browse the repository at this point in the history
another 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 1759084 commit d874a2b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/misc/phidgetservo.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,11 @@ servo_probe(struct usb_interface *interface, const struct usb_device_id *id)
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;
Expand Down

0 comments on commit d874a2b

Please sign in to comment.