diff options
author | Wolfram Sang <wsa-dev@sang-engineering.com> | 2016-08-25 13:39:00 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-30 13:17:36 -0400 |
commit | 93fab7955eb3af2de4c51f15f15a0881bf97c907 (patch) | |
tree | cf47777e18297a25c13cfdb56251659575d5d986 /drivers/usb | |
parent | b74e7062366af5b372b0f8ee5781c5e713ef67ad (diff) |
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/message.c | 5 |
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) | |||
1760 | nintf = cp->desc.bNumInterfaces; | 1760 | nintf = cp->desc.bNumInterfaces; |
1761 | new_interfaces = kmalloc(nintf * sizeof(*new_interfaces), | 1761 | new_interfaces = kmalloc(nintf * sizeof(*new_interfaces), |
1762 | GFP_NOIO); | 1762 | GFP_NOIO); |
1763 | if (!new_interfaces) { | 1763 | if (!new_interfaces) |
1764 | dev_err(&dev->dev, "Out of memory\n"); | ||
1765 | return -ENOMEM; | 1764 | return -ENOMEM; |
1766 | } | ||
1767 | 1765 | ||
1768 | for (; n < nintf; ++n) { | 1766 | for (; n < nintf; ++n) { |
1769 | new_interfaces[n] = kzalloc( | 1767 | new_interfaces[n] = kzalloc( |
1770 | sizeof(struct usb_interface), | 1768 | sizeof(struct usb_interface), |
1771 | GFP_NOIO); | 1769 | GFP_NOIO); |
1772 | if (!new_interfaces[n]) { | 1770 | if (!new_interfaces[n]) { |
1773 | dev_err(&dev->dev, "Out of memory\n"); | ||
1774 | ret = -ENOMEM; | 1771 | ret = -ENOMEM; |
1775 | free_interfaces: | 1772 | free_interfaces: |
1776 | while (--n >= 0) | 1773 | while (--n >= 0) |