diff options
author | Chen Ni <nichen@iscas.ac.cn> | 2024-03-05 07:59:27 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-03-06 20:33:01 -0800 |
commit | 07161b2416f740a2cb87faa5566873f401440a61 (patch) | |
tree | 2a1216c5a0349b672cac39c20240f52a2bbc4c2d /drivers/net | |
parent | 41cca0542d7c79b6be3920a917f643c075ad1561 (diff) |
sr9800: 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.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Simon Horman <horms@kernel.org>
Fixes: 19a38d8e0aa3 ("USB2NET : SR9800 : One chip USB2.0 USB2NET SR9800 Device Driver Support")
Link: https://lore.kernel.org/r/20240305075927.261284-1-nichen@iscas.ac.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/usb/sr9800.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/usb/sr9800.c b/drivers/net/usb/sr9800.c index 143bd4ab160d..57947a5590cc 100644 --- a/drivers/net/usb/sr9800.c +++ b/drivers/net/usb/sr9800.c @@ -737,7 +737,9 @@ static int sr9800_bind(struct usbnet *dev, struct usb_interface *intf) data->eeprom_len = SR9800_EEPROM_LEN; - usbnet_get_endpoints(dev, intf); + ret = usbnet_get_endpoints(dev, intf); + if (ret) + goto out; /* LED Setting Rule : * AABB:CCDD |