can: gs_usb: check for kzalloc allocation failure
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: NColin Ian King <colin.king@canonical.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
Showing
想要评论请 注册 或 登录