[media] 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 (18:03 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 24 Aug 2016 11:51:32 +0000 (08:51 -0300)
kmalloc will print enough information in case of failure.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/gspca/gspca.c

index b17bd7ebcb47f720c1395fbe6e01c06b9c846e90..af2395a76d8bf930f35bdf1afab4593ae65d162c 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,