summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2021-04-29 22:38:18 +0300
committerJiri Kosina <jkosina@suse.cz>2021-04-29 22:38:18 +0300
commit590ade88bafd8a88a2d3f69fa197cda491221b38 (patch)
tree099617183711decf235d3a8a33abe7f2ea9997e3 /drivers/hid
parent276559d8d02c2709281578976ca2f53bc62063d4 (diff)
parent9951bb259dd0794db39beb63899104da9579efcc (diff)
downloadlinux-590ade88bafd8a88a2d3f69fa197cda491221b38.tar.xz
Merge branch 'for-5.13/core' into for-linus
- hiddev_connect() return value fix from Jason Gerecke
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/usbhid/hiddev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index 45e0b1c75cb1..2fb2991dbe4c 100644
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -887,11 +887,11 @@ int hiddev_connect(struct hid_device *hid, unsigned int force)
break;
if (i == hid->maxcollection)
- return -1;
+ return -EINVAL;
}
if (!(hiddev = kzalloc(sizeof(struct hiddev), GFP_KERNEL)))
- return -1;
+ return -ENOMEM;
init_waitqueue_head(&hiddev->wait);
INIT_LIST_HEAD(&hiddev->list);
@@ -905,7 +905,7 @@ int hiddev_connect(struct hid_device *hid, unsigned int force)
hid_err(hid, "Not able to get a minor for this device\n");
hid->hiddev = NULL;
kfree(hiddev);
- return -1;
+ return retval;
}
/*