HID: fix suspend crash by moving initializations earlier
Although the usbhid driver allocates its usbhid structure in the probe routine, several critical fields in that structure don't get initialized until usbhid_start(). However if report descriptor parsing fails then usbhid_start() is never called. This leads to problems during system suspend -- the system will freeze. This patch (as1378) fixes the bug by moving the initialization statements up into usbhid_probe(). Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Reported-by: NBruno Prémont <bonbons@linux-vserver.org> Tested-By: NBruno Prémont <bonbons@linux-vserver.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
Showing
想要评论请 注册 或 登录