]> git.baikalelectronics.ru Git - kernel.git/commit
HID: nintendo: Add missing array termination
authorGuenter Roeck <linux@roeck-us.net>
Tue, 12 Jul 2022 22:17:05 +0000 (15:17 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 21 Jul 2022 11:48:16 +0000 (13:48 +0200)
commit400bf75612f3606a18eb736167f2d4909bbeb3ee
tree997422656d567376745469d84d00a3373e1fae8f
parentb53bbf5731f7270e908a51754d6770609c06279c
HID: nintendo: Add missing array termination

joycon_dpad_inputs_jc[] is unterminated. This may result in odd warnings
such as

input: input_set_capability: invalid code 3077588140 for type 1

or in kernel crashes in nintendo_hid_probe(). Terminate the array to fix
the problem.

Fixes: af1003c28be7d ("HID: nintendo: add nintendo switch controller driver")
Cc: Daniel J. Ogorchock <djogorchock@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-nintendo.c