Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: thrustmaster: fix return value check in thrustmaster_probe()

Fix the return value check which testing the wrong variable
in thrustmaster_probe().

Fixes: c49c33637802 ("HID: support for initialization of some Thrustmaster wheels")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Wei Yongjun and committed by
Jiri Kosina
ed1ab6ff 25bdbfbb

+1 -1
+1 -1
drivers/hid/hid-thrustmaster.c
··· 312 312 } 313 313 314 314 tm_wheel->change_request = kzalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL); 315 - if (!tm_wheel->model_request) { 315 + if (!tm_wheel->change_request) { 316 316 ret = -ENOMEM; 317 317 goto error5; 318 318 }