Commit ed1ab6ff authored by Wei Yongjun's avatar Wei Yongjun Committed by Jiri Kosina
Browse files

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



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

Fixes: c49c3363 ("HID: support for initialization of some Thrustmaster wheels")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 25bdbfbb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}