mirror of
https://github.com/wessel-novacustom/clevo-keyboard.git
synced 2024-11-15 03:34:01 +01:00
Check input device reference before using
This commit is contained in:
parent
4fa915fcc3
commit
da31d09aad
|
@ -300,9 +300,10 @@ static void uniwill_write_kbd_bl_reset(void)
|
|||
|
||||
void uniwill_event_callb(u32 code)
|
||||
{
|
||||
if (!sparse_keymap_report_known_event(uniwill_keyboard_driver.input_device, code, 1, true)) {
|
||||
TUXEDO_DEBUG("Unknown code - %d (%0#6x)\n", code, code);
|
||||
}
|
||||
if (uniwill_keyboard_driver.input_device != NULL)
|
||||
if (!sparse_keymap_report_known_event(uniwill_keyboard_driver.input_device, code, 1, true)) {
|
||||
TUXEDO_DEBUG("Unknown code - %d (%0#6x)\n", code, code);
|
||||
}
|
||||
|
||||
// Special key combination when mode change key is pressed
|
||||
if (code == 0xb0) {
|
||||
|
|
Loading…
Reference in a new issue