[media] media: usb: gspca: benq: don't print error when allocating urb fails
authorWolfram Sang <wsa-dev@sang-engineering.com>
Thu, 11 Aug 2016 21:03:51 +0000 (18:03 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 24 Aug 2016 11:51:13 +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/benq.c

index 790baed339639db4bb6174f7870b9ad3c6b5afff..5fa67b78ad49b1a1da48bb02144b011f6ef34443 100644 (file)
@@ -95,10 +95,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
 #define SD_NPKT 32
        for (n = 0; n < 4; n++) {
                urb = usb_alloc_urb(SD_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,
                                                SD_PKT_SZ * SD_NPKT,