usb: host: xhci: don't print on ENOMEM
authorWolfram Sang <wsa-dev@sang-engineering.com>
Thu, 25 Aug 2016 17:39:10 +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/host/xhci.c

index 01d96c9..1a4ca02 100644 (file)
@@ -295,10 +295,8 @@ static int xhci_setup_msix(struct xhci_hcd *xhci)
        xhci->msix_entries =
                kmalloc((sizeof(struct msix_entry))*xhci->msix_count,
                                GFP_KERNEL);
-       if (!xhci->msix_entries) {
-               xhci_err(xhci, "Failed to allocate MSI-X entries\n");
+       if (!xhci->msix_entries)
                return -ENOMEM;
-       }
 
        for (i = 0; i < xhci->msix_count; i++) {
                xhci->msix_entries[i].entry = i;