Skip to content

Commit eaac6a2

Browse files
Chen Nidavem330
authored andcommitted
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: 16626b0 ("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>
1 parent 818ed89 commit eaac6a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/usb/ax88172a.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ static int ax88172a_bind(struct usbnet *dev, struct usb_interface *intf)
161161
u8 buf[ETH_ALEN];
162162
struct ax88172a_private *priv;
163163

164-
usbnet_get_endpoints(dev, intf);
164+
ret = usbnet_get_endpoints(dev, intf);
165+
if (ret)
166+
return ret;
165167

166168
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
167169
if (!priv)

0 commit comments

Comments
 (0)