Message ID | 6bef0198-a455-6ede-c6da-58667771a45a@users.sourceforge.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c index 0f141762abf1..8be1c81b7cab 100644 --- a/drivers/media/usb/gspca/gspca.c +++ b/drivers/media/usb/gspca/gspca.c @@ -2037,10 +2037,8 @@ int gspca_dev_probe2(struct usb_interface *intf, - if (!gspca_dev) { - pr_err("couldn't kzalloc gspca struct\n"); + if (!gspca_dev) return -ENOMEM; - } + gspca_dev->usb_buf = kmalloc(USB_BUF_SZ, GFP_KERNEL); if (!gspca_dev->usb_buf) { - pr_err("out of memory\n"); ret = -ENOMEM; goto out; }