]> git.baikalelectronics.ru Git - kernel.git/commit
HID: debug: fix error handling in hid_debug_events_read()
authorJiri Kosina <jkosina@suse.cz>
Thu, 9 Apr 2015 11:32:35 +0000 (13:32 +0200)
committerJiri Kosina <jkosina@suse.cz>
Fri, 10 Apr 2015 15:32:21 +0000 (17:32 +0200)
commit69d9e4f5bffe0e3cebbc807ccdc8d3cd5d335856
tree8cae498d507f63e429c7e528f6332f6f998b3a47
parent5f3dd0f4d418c51613417f6384271634e867d0fa
HID: debug: fix error handling in hid_debug_events_read()

In the unlikely case of hdev vanishing while hid_debug_events_read() was
sleeping, we can't really break out of the case switch as with other cases,
as on the way out we'll try to remove ourselves from the hdev waitqueue.

Fix this by taking a shortcut exit path and avoiding cleanup that doesn't
make sense in case hdev doesn't exist any more anyway.

Reported-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-debug.c