]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitfb267095181b2e53797fc75bfc24f88ccbbccccf
treef9cd84858da485c32901e5a348f04864a6d1c190
parente79f840852191ba832889b32907506c91be11d7e
HID: logitech: check the return value of create_singlethread_workqueue

BugLink: https://bugs.launchpad.net/bugs/1838459
[ Upstream commit 6c44b15e1c9076d925d5236ddadf1318b0a25ce2 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/hid/hid-logitech-hidpp.c