Re: [patch] (re)implement setkeycode/getkeycode/kd_mksound/kbd_setrate via the input core

Matthew Wilcox (willy@debian.org)
Sun, 25 Aug 2002 22:14:27 +0100


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).

-- 
Revolutions do not require corporate support.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/