Re: [PATCH] can: gs_usb: check for kzalloc allocation failure

2015-03-17 Thread Marc Kleine-Budde
On 03/16/2015 11:42 PM, Colin King wrote: > From: Colin Ian King > > smatch detected the following issue: > drivers/net/can/usb/gs_usb.c:904 gs_usb_probe() error: >potential null dereference 'dev'. (kzalloc returns null) > > Add a check for null return from kzalloc and return -ENOMEM > > S

[PATCH] can: gs_usb: check for kzalloc allocation failure

2015-03-16 Thread Colin King
From: Colin Ian King smatch detected the following issue: drivers/net/can/usb/gs_usb.c:904 gs_usb_probe() error: potential null dereference 'dev'. (kzalloc returns null) Add a check for null return from kzalloc and return -ENOMEM Signed-off-by: Colin Ian King --- drivers/net/can/usb/gs_us