]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.13.15/hid-cp2112-add-hidraw-dependency.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.13.15 / hid-cp2112-add-hidraw-dependency.patch
1 From cde3076bdc38bf436e517a379759a9092c6ffd4f Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?S=C3=A9bastien=20Szymanski?=
3 <sebastien.szymanski@armadeus.com>
4 Date: Thu, 2 Nov 2017 12:12:43 +0100
5 Subject: HID: cp2112: add HIDRAW dependency
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 From: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
11
12 commit cde3076bdc38bf436e517a379759a9092c6ffd4f upstream.
13
14 Otherwise, with HIDRAW=n, the probe function crashes because of null
15 dereference of hdev->hidraw.
16
17 Fixes: 42cb6b35b9e6 ("HID: cp2112: use proper hidraw name with minor number")
18 Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
19 Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
20 Signed-off-by: Jiri Kosina <jkosina@suse.cz>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23 ---
24 drivers/hid/Kconfig | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27 --- a/drivers/hid/Kconfig
28 +++ b/drivers/hid/Kconfig
29 @@ -230,7 +230,7 @@ config HID_CMEDIA
30
31 config HID_CP2112
32 tristate "Silicon Labs CP2112 HID USB-to-SMBus Bridge support"
33 - depends on USB_HID && I2C && GPIOLIB
34 + depends on USB_HID && HIDRAW && I2C && GPIOLIB
35 select GPIOLIB_IRQCHIP
36 ---help---
37 Support for Silicon Labs CP2112 HID USB to SMBus Master Bridge.