We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 276559d + 9951bb2 commit 590ade8Copy full SHA for 590ade8
drivers/hid/usbhid/hiddev.c
@@ -887,11 +887,11 @@ int hiddev_connect(struct hid_device *hid, unsigned int force)
887
break;
888
889
if (i == hid->maxcollection)
890
- return -1;
+ return -EINVAL;
891
}
892
893
if (!(hiddev = kzalloc(sizeof(struct hiddev), GFP_KERNEL)))
894
+ return -ENOMEM;
895
896
init_waitqueue_head(&hiddev->wait);
897
INIT_LIST_HEAD(&hiddev->list);
@@ -905,7 +905,7 @@ int hiddev_connect(struct hid_device *hid, unsigned int force)
905
hid_err(hid, "Not able to get a minor for this device\n");
906
hid->hiddev = NULL;
907
kfree(hiddev);
908
+ return retval;
909
910
911
/*
0 commit comments