Skip to contentSkip to conversation

HID: amd_sfh: Fix max supported HID devices

PATCH Applied Basavaraj Natikar 2 participants 2 messages Apr 24, 2023 – Apr 25, 2023

Subsystems (2)
lore
Share & tools
lore

Basavaraj Natikar

author maintainer
#0 lore raw

PATCH 1/1 HID: amd_sfh: Fix max supported HID devices

commit 4bd763568dbd ("HID: amd_sfh: Support for additional light sensor") adds additional sensor devices, but forgets to add the number of HID devices to match. Thus, the number of HID devices does not match the actual number of sensors.

In order to prevent corruption and system hangs when more than the allowed number of HID devices are accessed, the number of HID devices is increased accordingly.

Fixes 4bd763568dbd ("HID: amd_sfh: Support for additional light sensor")
---
 drivers/hid/amd-sfh-hid/amd_sfh_hid.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/amd-sfh-hid/amd_sfh_hid.h +1 -1
index 528036892c9d..97296f587bc7 100644
@@ -11,7 +11,7 @@
 #ifndef AMDSFH_HID_H
 #define AMDSFH_HID_H
 
-#define MAX_HID_DEVICES		5
+#define MAX_HID_DEVICES		6
 #define AMD_SFH_HID_VENDOR	0x1022
 #define AMD_SFH_HID_PRODUCT	0x0001
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 10 lines · Basavaraj Natikar

commit 4bd763568dbd ("HID: amd_sfh: Support for additional light sensor") adds additional sensor devices, but forgets to add the number of HID devices to match. Thus, the number of HID devices does not match the actual number of sensors.

In order to prevent corruption and system hangs when more than the allowed number of HID devices are accessed, the number of HID devices is increased accordingly.

[...]

Applied to hid/hid.git (for-6.4/amd-sfh), thanks!

[1/1] HID: amd_sfh: Fix max supported HID devices

      https://git.kernel.org/hid/hid/c/37386669887d

Cheers,

Signature · 1 line
Benjamin Tissoires <[email protected]>