From 14f8dc49532f765968ff37c3b99edbeb99004ace Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Thu, 7 Feb 2013 11:46:27 +0000 Subject: drivers: net: Remove remaining alloc/OOM messages alloc failures already get standardized OOM messages and a dump_stack. For the affected mallocs around these OOM messages: Converted kmallocs with multiplies to kmalloc_array. Converted a kmalloc/memcpy to kmemdup. Removed now unused stack variables. Removed unnecessary parentheses. Neatened alignment. Signed-off-by: Joe Perches Acked-by: Arend van Spriel Acked-by: Marc Kleine-Budde Acked-by: John W. Linville Signed-off-by: David S. Miller --- drivers/net/can/usb/ems_usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/net/can') diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index 0e7bde73c3d2..5f9a7ad9b964 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c @@ -1019,10 +1019,8 @@ static int ems_usb_probe(struct usb_interface *intf, dev->tx_msg_buffer = kzalloc(CPC_HEADER_SIZE + sizeof(struct ems_cpc_msg), GFP_KERNEL); - if (!dev->tx_msg_buffer) { - dev_err(&intf->dev, "Couldn't alloc Tx buffer\n"); + if (!dev->tx_msg_buffer) goto cleanup_intr_in_buffer; - } usb_set_intfdata(intf, dev); -- cgit v1.2.3-58-ga151