HID: cp2112: add HIDRAW dependency
authorSébastien Szymanski <sebastien.szymanski@armadeus.com>
Thu, 2 Nov 2017 11:12:43 +0000 (12:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Nov 2017 08:49:23 +0000 (09:49 +0100)
commit cde3076bdc38bf436e517a379759a9092c6ffd4f upstream.

Otherwise, with HIDRAW=n, the probe function crashes because of null
dereference of hdev->hidraw.

Fixes: 42cb6b35b9e6 ("HID: cp2112: use proper hidraw name with minor number")
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/Kconfig

index 374301fcbc86791e5005ba3e1b45a35c496174ad..8c7a0ce147a136c6596b1580b25de71c059507c2 100644 (file)
@@ -230,7 +230,7 @@ config HID_CMEDIA
 
 config HID_CP2112
        tristate "Silicon Labs CP2112 HID USB-to-SMBus Bridge support"
-       depends on USB_HID && I2C && GPIOLIB
+       depends on USB_HID && HIDRAW && I2C && GPIOLIB
        select GPIOLIB_IRQCHIP
        ---help---
        Support for Silicon Labs CP2112 HID USB to SMBus Master Bridge.