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

index a7de8e8..5d3d914 100644 (file)
@@ -601,11 +601,8 @@ static int uhci_start(struct usb_hcd *hcd)
 
        uhci->frame_cpu = kcalloc(UHCI_NUMFRAMES, sizeof(*uhci->frame_cpu),
                        GFP_KERNEL);
-       if (!uhci->frame_cpu) {
-               dev_err(uhci_dev(uhci),
-                       "unable to allocate memory for frame pointers\n");
+       if (!uhci->frame_cpu)
                goto err_alloc_frame_cpu;
-       }
 
        uhci->td_pool = dma_pool_create("uhci_td", uhci_dev(uhci),
                        sizeof(struct uhci_td), 16, 0);