All kmalloc-based functions print enough information on failures.

Signed-off-by: Wolfram Sang <wsa-...@sang-engineering.com>
---
 drivers/usb/wusbcore/wa-nep.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/usb/wusbcore/wa-nep.c b/drivers/usb/wusbcore/wa-nep.c
index 6140100ad50e41..ed4622279c63c0 100644
--- a/drivers/usb/wusbcore/wa-nep.c
+++ b/drivers/usb/wusbcore/wa-nep.c
@@ -271,11 +271,8 @@ int wa_nep_create(struct wahc *wa, struct usb_interface 
*iface)
        epd = &iface->cur_altsetting->endpoint[0].desc;
        wa->nep_buffer_size = 1024;
        wa->nep_buffer = kmalloc(wa->nep_buffer_size, GFP_KERNEL);
-       if (wa->nep_buffer == NULL) {
-               dev_err(dev,
-                       "Unable to allocate notification's read buffer\n");
+       if (!wa->nep_buffer)
                goto error_nep_buffer;
-       }
        wa->nep_urb = usb_alloc_urb(0, GFP_KERNEL);
        if (wa->nep_urb == NULL)
                goto error_urb_alloc;
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to