media: usb: gspca: gspca: don't print error when allocating urb fails
authorWolfram Sang <wsa-dev@sang-engineering.com>
Thu, 11 Aug 2016 21:03:52 +0000 (23:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Aug 2016 17:13:54 +0000 (19:13 +0200)
kmalloc will print enough information in case of failure.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/gspca/gspca.c

index b17bd7e..af2395a 100644 (file)
@@ -795,10 +795,8 @@ static int create_urbs(struct gspca_dev *gspca_dev,
 
        for (n = 0; n < nurbs; n++) {
                urb = usb_alloc_urb(npkt, GFP_KERNEL);
-               if (!urb) {
-                       pr_err("usb_alloc_urb failed\n");
+               if (!urb)
                        return -ENOMEM;
-               }
                gspca_dev->urb[n] = urb;
                urb->transfer_buffer = usb_alloc_coherent(gspca_dev->dev,
                                                bsize,