Skip to content

Commit 84f11ce

Browse files
Wolfram Sanggregkh
authored andcommitted
usb: wusbcore: wa-nep: 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>
1 parent d919523 commit 84f11ce

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎drivers/usb/wusbcore/wa-nep.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,8 @@ int wa_nep_create(struct wahc *wa, struct usb_interface *iface)
271271
epd = &iface->cur_altsetting->endpoint[0].desc;
272272
wa->nep_buffer_size = 1024;
273273
wa->nep_buffer = kmalloc(wa->nep_buffer_size, GFP_KERNEL);
274-
if (wa->nep_buffer == NULL) {
275-
dev_err(dev,
276-
"Unable to allocate notification's read buffer\n");
274+
if (!wa->nep_buffer)
277275
goto error_nep_buffer;
278-
}
279276
wa->nep_urb = usb_alloc_urb(0, GFP_KERNEL);
280277
if (wa->nep_urb == NULL)
281278
goto error_urb_alloc;

0 commit comments

Comments
 (0)