Skip to contentSkip to conversation

(re)implement setkeycode/getkeycode/kd_mksound/kbd_setrate via the input core

PATCH Matthew Wilcox 1 participant 1 message Aug 25, 2002

lore
Share & tools
lore
#0 lore raw

This bit looks wrong to me:

+ for (handle = kbd_handler.handle; handle; handle = handle->hnext)
+ if (handle->dev->keycodesize) break;
+
+ if (!handle->dev->keycodesize)
+ return -ENODEV;

if we reach termination for the loop without finding a keycodesize, handle will be NULL, so you'd get an oops. Just do:

+ if (!handle)
+ return -ENODEV

(sorry about the formatting, i'm reading l-k via uwsg's web archive).

Signature · 1 line
Revolutions do not require corporate support.