Commit 0e13e7b
HID: logitech-hidpp: Guard FF init code against non-USB devices
The Force Feedback code assumes that all the devices passed to it will
be USB devices, but that might not be the case for emulated devices.
Guard against a crash by checking the device type before poking at USB
properties.
Cc: stable@vger.kernel.org # v5.16+
Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20221215154416.111704-1-hadess@hadess.net1 parent 2043f9a commit 0e13e7b
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2548 | 2548 | | |
2549 | 2549 | | |
2550 | 2550 | | |
2551 | | - | |
2552 | | - | |
| 2551 | + | |
| 2552 | + | |
2553 | 2553 | | |
2554 | 2554 | | |
2555 | 2555 | | |
2556 | 2556 | | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
| 2561 | + | |
2557 | 2562 | | |
2558 | 2563 | | |
2559 | 2564 | | |
| |||
2567 | 2572 | | |
2568 | 2573 | | |
2569 | 2574 | | |
| 2575 | + | |
| 2576 | + | |
2570 | 2577 | | |
2571 | 2578 | | |
2572 | 2579 | | |
| |||
0 commit comments