usb: misc: yurex: don't print error when allocating urb fails
authorWolfram Sang <wsa-dev@sang-engineering.com>
Thu, 11 Aug 2016 21:14:45 +0000 (23:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Aug 2016 13:54:27 +0000 (15:54 +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/usb/misc/yurex.c

index 343fa6ff9f4badbf47b38c1f0f867057d0d089f7..bb606bdc25e5581ebaf84600628c02d333ea3e12 100644 (file)
@@ -231,10 +231,8 @@ static int yurex_probe(struct usb_interface *interface, const struct usb_device_
 
        /* allocate control URB */
        dev->cntl_urb = usb_alloc_urb(0, GFP_KERNEL);
-       if (!dev->cntl_urb) {
-               dev_err(&interface->dev, "Could not allocate control URB\n");
+       if (!dev->cntl_urb)
                goto error;
-       }
 
        /* allocate buffer for control req */
        dev->cntl_req = kmalloc(YUREX_BUF_SIZE, GFP_KERNEL);
@@ -269,10 +267,8 @@ static int yurex_probe(struct usb_interface *interface, const struct usb_device_
 
        /* allocate interrupt URB */
        dev->urb = usb_alloc_urb(0, GFP_KERNEL);
-       if (!dev->urb) {
-               dev_err(&interface->dev, "Could not allocate URB\n");
+       if (!dev->urb)
                goto error;
-       }
 
        /* allocate buffer for interrupt in */
        dev->int_buffer = usb_alloc_coherent(dev->udev, YUREX_BUF_SIZE,
This page took 0.02518 seconds and 5 git commands to generate.