From: Henrik Rydberg Date: Thu, 13 Sep 2012 06:59:40 +0000 (+0200) Subject: Input: Fix oops caused by missing null test X-Git-Tag: next-20120914~61^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ccc6557bfd02efdca4d9dfda6cfdfe5a08d0193b;p=karo-tx-linux.git Input: Fix oops caused by missing null test Found in linux-next on September 12, thanks Sedat. Reported-by: Sedat Dilek Signed-off-by: Henrik Rydberg --- diff --git a/drivers/input/input.c b/drivers/input/input.c index 5b66b2faf177..2dff71bd7b1d 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -114,7 +114,7 @@ static unsigned int input_to_handler(struct input_handle *handle, if (handler->events) handler->events(handle, vals, count); - else + else if (handler->event) for (v = vals; v != end; v++) handler->event(handle, v->type, v->code, v->value);