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

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

Fixes: c49c336378 ("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>
This commit is contained in:
Wei Yongjun 2021-04-02 09:40:41 +00:00 committed by Jiri Kosina
parent 25bdbfbb2d
commit ed1ab6ff21
1 changed files with 1 additions and 1 deletions

View File

@ -312,7 +312,7 @@ static int thrustmaster_probe(struct hid_device *hdev, const struct hid_device_i
}
tm_wheel->change_request = kzalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL);
if (!tm_wheel->model_request) {
if (!tm_wheel->change_request) {
ret = -ENOMEM;
goto error5;
}