From: Founder Fang Date: Wed, 21 Nov 2012 07:20:31 +0000 (+0800) Subject: HID: hidraw: fix nonblock read return EAGAIN after device removed X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~36^2^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7611e8d26d8dd0e5e132b46e905cb579daf9da1e;p=pandora-kernel.git HID: hidraw: fix nonblock read return EAGAIN after device removed When nonblock read the condition check (file->f_flags & O_NONBLOCK) always be true, signal_pending and device exist checking never get a chance to run, so the user mode code always get EAGAIN even if device removed. move nonblock mode checking to the last can fix this problem. Signed-off-by: Founder Fang Reviewed-by: Dmitry Torokhov Signed-off-by: Jiri Kosina --- Reading git-diff-tree failed