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

index 0712b1bc90b4dd5f3f87796865837de66f30c595..40aaaa9c5f30ebd0990d5df3fecebfed4faa123a 100644 (file)
@@ -208,10 +208,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
                packet_size =
                        le16_to_cpu(alt->endpoint[i].desc.wMaxPacketSize);
                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,
                                                packet_size * SD_NPKT,