Skip to content

Commit

Permalink
asix: Add check for usbnet_get_endpoints
Browse files Browse the repository at this point in the history
[ Upstream commit eaac6a2 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Chen Ni authored and gregkh committed Jan 10, 2024
1 parent 67a4a25 commit ba75a06
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/usb/ax88172a.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ba75a06

Please sign in to comment.