Skip to content

Commit 590ade8

Browse files
author
Jiri Kosina
committed
Merge branch 'for-5.13/core' into for-linus
- hiddev_connect() return value fix from Jason Gerecke
2 parents 276559d + 9951bb2 commit 590ade8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/hid/usbhid/hiddev.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -887,11 +887,11 @@ int hiddev_connect(struct hid_device *hid, unsigned int force)
887887
break;
888888

889889
if (i == hid->maxcollection)
890-
return -1;
890+
return -EINVAL;
891891
}
892892

893893
if (!(hiddev = kzalloc(sizeof(struct hiddev), GFP_KERNEL)))
894-
return -1;
894+
return -ENOMEM;
895895

896896
init_waitqueue_head(&hiddev->wait);
897897
INIT_LIST_HEAD(&hiddev->list);
@@ -905,7 +905,7 @@ int hiddev_connect(struct hid_device *hid, unsigned int force)
905905
hid_err(hid, "Not able to get a minor for this device\n");
906906
hid->hiddev = NULL;
907907
kfree(hiddev);
908-
return -1;
908+
return retval;
909909
}
910910

911911
/*

0 commit comments

Comments
 (0)