HID: uhid: Fix sending events with invalid data
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>
Sat, 14 Jul 2012 21:59:25 +0000 (18:59 -0300)
committerColin Cross <ccross@android.com>
Thu, 16 Aug 2012 19:44:30 +0000 (12:44 -0700)
commitd4bad8b2ea1c76b0c5ea55fbbf04e2115f560c22
tree1eddda84b5d1cf91a1e14e19ebdde318229fa61f
parentdb5889812ad156019303e50e3fa73773620f79d4
HID: uhid: Fix sending events with invalid data

This was detected because events with invalid types were arriving
to userspace.

The code before this patch would only work for the first event in the
queue (when uhid->tail is 0).

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Reviewed-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/uhid.c