HID: fix oops during suspend of unbound HID devices
authorJiri Slaby <jirislaby@gmail.com>
Mon, 27 Oct 2008 11:16:15 +0000 (12:16 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 27 Oct 2008 14:06:01 +0000 (15:06 +0100)
Usbhid structure is allocated on start invoked only from probe
of some driver. When there is no driver, the structure is null
and causes null-dereference oopses.

Fix it by allocating the structure on probe and disconnect of
the device itself. Also make sure we won't race between start
and resume or stop and suspend respectively.

References: http://bugzilla.kernel.org/show_bug.cgi?id=11827

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Andreas Schwab <schwab@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

No differences found