usb: core: urb: don't print on ENOMEM
authorWolfram Sang <wsa-dev@sang-engineering.com>
Thu, 25 Aug 2016 17:39:01 +0000 (19:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Aug 2016 17:17:37 +0000 (19:17 +0200)
All kmalloc-based functions print enough information on failures.

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

index c601e25b609fb58e6842c18e62e5c484c98182ae..a9039696476e68c8da475bbe40e1b841e64d903b 100644 (file)
@@ -68,10 +68,8 @@ struct urb *usb_alloc_urb(int iso_packets, gfp_t mem_flags)
        urb = kmalloc(sizeof(struct urb) +
                iso_packets * sizeof(struct usb_iso_packet_descriptor),
                mem_flags);
-       if (!urb) {
-               printk(KERN_ERR "alloc_urb: kmalloc failed\n");
+       if (!urb)
                return NULL;
-       }
        usb_init_urb(urb);
        return urb;
 }