summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Sang <wsa-dev@sang-engineering.com>2016-08-25 20:39:01 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-30 20:17:37 +0300
commitb62a7a99b89970b66ebc1b1fd8ad29116ffc3519 (patch)
tree0e1848e6b418a417e04fc374a06b554b498589a2
parent93fab7955eb3af2de4c51f15f15a0881bf97c907 (diff)
downloadlinux-b62a7a99b89970b66ebc1b1fd8ad29116ffc3519.tar.xz
usb: core: urb: don't print on ENOMEM
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>
-rw-r--r--drivers/usb/core/urb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index c601e25b609f..a9039696476e 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -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;
}