Commit a8eeb74
Input: gtco - fix endpoint sanity check
The driver was checking the number of endpoints of the first alternate
setting instead of the current one, something which could lead to the
driver binding to an invalid interface.
This in turn could cause the driver to misbehave or trigger a WARN() in
usb_submit_urb() that kernels with panic_on_warn set would choke on.
Fixes: 162f98d ("Input: gtco - fix crash on detecting device without endpoints")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Vladis Dronov <vdronov@redhat.com>
Link: https://lore.kernel.org/r/20191210113737.4016-5-johan@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>1 parent cfa4f6a commit a8eeb74
1 file changed
Lines changed: 3 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
875 | 875 | | |
876 | 876 | | |
877 | 877 | | |
878 | | - | |
| 878 | + | |
879 | 879 | | |
880 | 880 | | |
881 | 881 | | |
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
| 885 | + | |
890 | 886 | | |
891 | 887 | | |
892 | 888 | | |
| |||
973 | 969 | | |
974 | 970 | | |
975 | 971 | | |
976 | | - | |
| 972 | + | |
977 | 973 | | |
978 | 974 | | |
979 | 975 | | |
| |||
0 commit comments