Closed SuperSamus closed 2 years ago
What is this for?
From the commit description:
The function alloc_workqueue() in nintendo_hid_probe() can fail, but
there is no check of its return value. To fix this bug, its return value
should be checked with new error handling code.
Fixes: https://github.com/torvalds/linux/commit/c4eae84feff3e68c2f385aa10faea4a96791e7ad ("HID: nintendo: add rumble support")
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Reviewed-by: Silvan Jegen <s.jegen@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
@SuperSamus Thank you, I could not find the original commit.
This is in no way related to the current random disconnection issues, or is it?
Yes, it is unrelated. This is just an extra safety check to prevent invalid memory access in case of allocation failure.
Disconnects are an issue with bluetooth stack rather than this module itself from what I know.
Ported from upstream.