diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2021-04-02 11:40:41 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2021-05-05 14:26:38 +0200 |
commit | ed1ab6ff213a701d4a635883c63e0d6fcbbab27d (patch) | |
tree | f42216981023dfffcaffb066491546b00ffa6e01 /drivers/hid/hid-thrustmaster.c | |
parent | HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for Saitek X65 (diff) | |
download | linux-ed1ab6ff213a701d4a635883c63e0d6fcbbab27d.tar.xz linux-ed1ab6ff213a701d4a635883c63e0d6fcbbab27d.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | drivers/hid/hid-thrustmaster.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-thrustmaster.c b/drivers/hid/hid-thrustmaster.c index 2e452c6e8ef4..f643b1cb112d 100644 --- a/drivers/hid/hid-thrustmaster.c +++ b/drivers/hid/hid-thrustmaster.c @@ -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; } |