[PATCH] USB: kzalloc in cytherm
another one for kzalloc. Signed-off-by: Oliver Neukum <oliver@neukum.name> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
51b208ddf6
commit
5f7481337c
|
@ -351,12 +351,11 @@ static int cytherm_probe(struct usb_interface *interface,
|
|||
struct usb_cytherm *dev = NULL;
|
||||
int retval = -ENOMEM;
|
||||
|
||||
dev = kmalloc (sizeof(struct usb_cytherm), GFP_KERNEL);
|
||||
dev = kzalloc (sizeof(struct usb_cytherm), 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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue