Re: [PATCH] can: gs_usb: check for kzalloc allocation failure
From: Marc Kleine-Budde
Date: Tue Mar 17 2015 - 04:05:31 EST
On 03/16/2015 11:42 PM, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> 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 <colin.king@xxxxxxxxxxxxx>
Thanks, applied to can.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Attachment:
signature.asc
Description: OpenPGP digital signature