summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorChen Ni <nichen@iscas.ac.cn>2024-01-03 04:35:34 +0100
committerDavid S. Miller <davem@davemloft.net>2024-01-04 11:50:57 +0100
commiteaac6a2d26b65511e164772bec6918fcbc61938e (patch)
tree9daf6015ba092c394d79cc169ec4254a4b7c252e /drivers/net/usb
parentocteontx2-af: Re-enable MAC TX in otx2_stop processing (diff)
downloadlinux-eaac6a2d26b65511e164772bec6918fcbc61938e.tar.xz
linux-eaac6a2d26b65511e164772bec6918fcbc61938e.zip
asix: Add check for usbnet_get_endpoints
Add check for usbnet_get_endpoints() and return the error if it fails in order to transfer the error. Fixes: 16626b0cc3d5 ("asix: Add a new driver for the AX88172A") Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/ax88172a.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/usb/ax88172a.c b/drivers/net/usb/ax88172a.c
index 3777c7e2e6fc..e47bb125048d 100644
--- a/drivers/net/usb/ax88172a.c
+++ b/drivers/net/usb/ax88172a.c
@@ -161,7 +161,9 @@ static int ax88172a_bind(struct usbnet *dev, struct usb_interface *intf)
u8 buf[ETH_ALEN];
struct ax88172a_private *priv;
- usbnet_get_endpoints(dev, intf);
+ ret = usbnet_get_endpoints(dev, intf);
+ if (ret)
+ return ret;
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv)