Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: usb: ax88179_178a: Add check for usbnet_get_endpoints()

To avoid the failure of usbnet_get_endpoints(), we should check the
return value of the usbnet_get_endpoints().

Signed-off-by: Ma Ke <make_ruc2021@163.com>
Reviewed-by: Hariprasad Kelam <hkelam@marvell.com>
Link: https://lore.kernel.org/r/20240424065634.1870027-1-make_ruc2021@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Ma Ke and committed by
Jakub Kicinski
3837639e 0805d67b

+4 -1
+4 -1
drivers/net/usb/ax88179_178a.c
··· 1286 1286 static int ax88179_bind(struct usbnet *dev, struct usb_interface *intf) 1287 1287 { 1288 1288 struct ax88179_data *ax179_data; 1289 + int ret; 1289 1290 1290 - usbnet_get_endpoints(dev, intf); 1291 + ret = usbnet_get_endpoints(dev, intf); 1292 + if (ret < 0) 1293 + return ret; 1291 1294 1292 1295 ax179_data = kzalloc(sizeof(*ax179_data), GFP_KERNEL); 1293 1296 if (!ax179_data)