Skip to content

Commit 46590b5

Browse files
hayesorzkuba-moo
authored andcommitted
r8152: fix unknown device for choose_configuration
For the unknown device, rtl8152_cfgselector_choose_configuration() should return a negative value. Then, usb_choose_configuration() would set a configuration for CDC ECM or NCM mode. Otherwise, there is no usb interface driver for the device. Fixes: aa4f2b3 ("r8152: Choose our USB config with choose_configuration() rather than probe()") Signed-off-by: Hayes Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 8f4cd89 commit 46590b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/usb/r8152.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10078,7 +10078,7 @@ static int rtl8152_cfgselector_choose_configuration(struct usb_device *udev)
1007810078
* driver supports it.
1007910079
*/
1008010080
if (__rtl_get_hw_ver(udev) == RTL_VER_UNKNOWN)
10081-
return 0;
10081+
return -ENODEV;
1008210082

1008310083
/* The vendor mode is not always config #1, so to find it out. */
1008410084
c = udev->config;

0 commit comments

Comments
 (0)