Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323484
b: refs/heads/master
c: a6fbaac
h: refs/heads/master
v: v3
  • Loading branch information
Sachin Kamat authored and Jiri Kosina committed Sep 17, 2012
1 parent f706ff7 commit b2872ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 832fbeaef446a7024c5e0f19b7122100a7b1003d
refs/heads/master: a6fbaacfb990580c080e4fad6623b7108f5a0507
6 changes: 3 additions & 3 deletions trunk/drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ static int open_collection(struct hid_parser *parser, unsigned type)

if (parser->collection_stack_ptr == HID_COLLECTION_STACK_SIZE) {
hid_err(parser->device, "collection stack overflow\n");
return -1;
return -EINVAL;
}

if (parser->device->maxcollection == parser->device->collection_size) {
collection = kmalloc(sizeof(struct hid_collection) *
parser->device->collection_size * 2, GFP_KERNEL);
if (collection == NULL) {
hid_err(parser->device, "failed to reallocate collection array\n");
return -1;
return -ENOMEM;
}
memcpy(collection, parser->device->collection,
sizeof(struct hid_collection) *
Expand Down Expand Up @@ -170,7 +170,7 @@ static int close_collection(struct hid_parser *parser)
{
if (!parser->collection_stack_ptr) {
hid_err(parser->device, "collection stack underflow\n");
return -1;
return -EINVAL;
}
parser->collection_stack_ptr--;
return 0;
Expand Down

0 comments on commit b2872ec

Please sign in to comment.