Commit 279272eb authored by 倪琛's avatar 倪琛 Committed by felix
Browse files

sr9800: Add check for usbnet_get_endpoints

stable inclusion
from stable-v5.10.214
commit 6b4a39acafaf0186ed8e97c16e0aa6fca0e52009
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9C6FA
CVE: CVE-2024-26651

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6b4a39acafaf0186ed8e97c16e0aa6fca0e52009



--------------------------------

[ Upstream commit 07161b2416f740a2cb87faa5566873f401440a61 ]

Add check for usbnet_get_endpoints() and return the error if it fails
in order to transfer the error.

Signed-off-by: default avatarChen Ni <nichen@iscas.ac.cn>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Fixes: 19a38d8e ("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: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarFelix Fu <fuzhen5@huawei.com>
parent 737efe73
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -736,7 +736,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