patch "USB: lvtest: return proper error code in probe" added to usb-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
USB: lvtest: return proper error code in probe
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 531412492ce93ea29b9ca3b4eb5e3ed771f851dd Mon Sep 17 00:00:00 2001
From: Evgeny Novikov <[email protected]>
Date: Wed, 5 Aug 2020 12:06:43 +0300
Subject: USB: lvtest: return proper error code in probe
lvs_rh_probe() can return some nonnegative value from usb_control_msg() when it is less than "USB_DT_HUB_NONVAR_SIZE + 2" that is considered as a failure. Make lvs_rh_probe() return -EINVAL in this case.
Found by Linux Driver Verification project (linuxtesting.org).
--- drivers/usb/misc/lvstest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/misc/lvstest.c +1 -1
@@ -426,7 +426,7 @@ static int lvs_rh_probe(struct usb_interface *intf, USB_DT_SS_HUB_SIZE, USB_CTRL_GET_TIMEOUT);if (ret < (USB_DT_HUB_NONVAR_SIZE +2 )) {dev_err (&hdev->dev,"wrong root hub descriptor read %d\n" , ret); -return ret; +return ret <0 ? ret : -EINVAL ; }/* submit urb to poll interrupt endpoint */
Signature · 1 line
2.28.0