summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Sang <wsa-dev@sang-engineering.com>2016-08-25 20:39:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-30 20:17:36 +0300
commit93fab7955eb3af2de4c51f15f15a0881bf97c907 (patch)
treecf47777e18297a25c13cfdb56251659575d5d986
parentb74e7062366af5b372b0f8ee5781c5e713ef67ad (diff)
downloadlinux-93fab7955eb3af2de4c51f15f15a0881bf97c907.tar.xz
usb: core: message: 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/message.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 0406a59f0551..5ab5c1a81462 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -1760,17 +1760,14 @@ int usb_set_configuration(struct usb_device *dev, int configuration)
nintf = cp->desc.bNumInterfaces;
new_interfaces = kmalloc(nintf * sizeof(*new_interfaces),
GFP_NOIO);
- if (!new_interfaces) {
- dev_err(&dev->dev, "Out of memory\n");
+ if (!new_interfaces)
return -ENOMEM;
- }
for (; n < nintf; ++n) {
new_interfaces[n] = kzalloc(
sizeof(struct usb_interface),
GFP_NOIO);
if (!new_interfaces[n]) {
- dev_err(&dev->dev, "Out of memory\n");
ret = -ENOMEM;
free_interfaces:
while (--n >= 0)