Input: evdev - properly handle read/write with count 0
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 2 May 2012 07:13:37 +0000 (00:13 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 2 May 2012 07:23:58 +0000 (00:23 -0700)
According to the standard count 0 is special - no IO should happen but we
can check error conditions (device gone away, etc), and return 0 if there
are no errors. We used to return -EINVAL instead and we also could return 0
if an event was "stolen" by another thread.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

No differences found