usb: core: devices: drop unreachable code in usb_dump_endpoint_descriptor()
PATCH 1/1 usb: core: devices: drop unreachable code in usb_dump_endpoint_descriptor()
The *switch* statement in usb_dump_endpoint_descriptor() does handle all possible endpoint types expilictly, so the *defaut* label is unreachable.
Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool.
---
This patch is against the 'usb-next' branch of Greg KH's 'usb.git' repo.
drivers/usb/core/devices.c | 2 -- 1 file changed, 2 deletions(-)
drivers/usb/core/devices.c +0 -2
@@ -168,8 +168,6 @@ static char *usb_dump_endpoint_descriptocase USB_ENDPOINT_XFER_INT : type ="Int." ;break ; -default :/* "can't happen" */ -return start; } interval =usb_decode_interval (desc, speed);
Quoted 2 lines · Sergey Shtylyov
The *switch* statement in
usb_dump_endpoint_descriptor()does handle all possible endpoint types expilictly, so the *defaut* label is unreachable.
It's *default*. :-) Please fix when/if merging!
Quoted 5 lines
Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool.
Signed-off-by Sergey Shtylyov <[email protected]>
[...]
MBR, Sergey
Quoted 4 lines · Sergey Shtylyov
Quoted 2 lines
The *switch* statement in
usb_dump_endpoint_descriptor()does handle all possible endpoint types expilictly, so the *defaut* label is unreachable.It's *default*. :-) Please fix when/if merging!
Oh, and it's expilicitly! :-/
Quoted 6 lines
Quoted 4 lines
Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool.
Signed-off-by Sergey Shtylyov <[email protected]>[...]
MBR, Sergey
Greg Kroah-Hartman
maintainerQuoted 6 lines · Sergey Shtylyov
Quoted 2 lines · Sergey Shtylyov
The *switch* statement in
usb_dump_endpoint_descriptor()does handle all possible endpoint types expilictly, so the *defaut* label is unreachable.It's *default*. :-) Please fix when/if merging!
I can not easily change changelog texts when applying patches as the tools suck the patch in from the public archive, sorry.
Please resend.