Thread (2 messages) 2 messages, 2 authors, 2022-04-06

Re: [PATCH] HID: add missing dependencies on HIDRAW

From: rishi gupta <gupt21@gmail.com>
Date: 2022-04-06 17:37:46

Thanks Tobias!

Reviewed-by: Rishi Gupta <gupt21@gmail.com>


On Wed, Aug 18, 2021 at 2:26 AM Tobias Junghans
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
hid-led, hid-u2fzero and hid-mcp2221 unconditionally access the hidraw
member of the hid_device structure to obtain the hidraw minor number.
Building without HIDRAW causes a NULL pointer dereference in the
corresponding probe handlers.

Signed-off-by: Tobias Junghans <redacted>
---
 drivers/hid/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 160554903ef9..00416b3091e7 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -522,6 +522,7 @@ config HID_LCPOWER
 config HID_LED
        tristate "Simple RGB LED support"
        depends on HID
+       depends on HIDRAW
        depends on LEDS_CLASS
        help
        Support for simple RGB LED devices. Currently supported are:
@@ -1093,6 +1094,7 @@ config HID_UDRAW_PS3
 config HID_U2FZERO
        tristate "U2F Zero LED and RNG support"
        depends on USB_HID
+       depends on HIDRAW
        depends on LEDS_CLASS
        depends on HW_RANDOM
        help
@@ -1213,6 +1215,7 @@ config HID_ALPS
 config HID_MCP2221
        tristate "Microchip MCP2221 HID USB-to-I2C/SMbus host support"
        depends on USB_HID && I2C
+       depends on HIDRAW
        depends on GPIOLIB
        help
        Provides I2C and SMBUS host adapter functionality over USB-HID
--
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help