]> git.baikalelectronics.ru Git - kernel.git/commit
HID: logitech: check the return value of create_singlethread_workqueue
authorKangjie Lu <kjlu@umn.edu>
Thu, 14 Mar 2019 05:24:02 +0000 (00:24 -0500)
committerJiri Kosina <jkosina@suse.cz>
Tue, 19 Mar 2019 10:47:31 +0000 (11:47 +0100)
commit74326645e6bb314e1aeb8ed3e5e93f571904e06e
tree147f038986d66f05982ef1d8df8b0a39d12636e3
parent73465ba4d7395685f36b2fbe32618068eea6bddd
HID: logitech: check the return value of create_singlethread_workqueue

create_singlethread_workqueue may fail and return NULL. The fix checks if it is
NULL to avoid NULL pointer dereference.  Also, the fix moves the call of
create_singlethread_workqueue earlier to avoid resource-release issues.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-logitech-hidpp.c