Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72993
b: refs/heads/master
c: 368d290
h: refs/heads/master
i:
  72991: 5bea3a1
v: v3
  • Loading branch information
Dirk Hohndel authored and Jiri Kosina committed Oct 31, 2007
1 parent b95286b commit 8ae5002
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 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: d624284b06f869dad87a70a8d0cad72fbf7527b9
refs/heads/master: 368d290ba2a66338303b5d3998b182e404a9eb38
18 changes: 14 additions & 4 deletions trunk/drivers/hid/hid-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ int hidinput_connect(struct hid_device *hid)
kfree(hidinput);
input_free_device(input_dev);
err_hid("Out of memory during hid input probe");
return -1;
goto out_unwind;
}

input_set_drvdata(input_dev, hid);
Expand Down Expand Up @@ -1186,15 +1186,25 @@ int hidinput_connect(struct hid_device *hid)
* UGCI) cram a lot of unrelated inputs into the
* same interface. */
hidinput->report = report;
input_register_device(hidinput->input);
if (input_register_device(hidinput->input))
goto out_cleanup;
hidinput = NULL;
}
}

if (hidinput)
input_register_device(hidinput->input);
if (hidinput && input_register_device(hidinput->input))
goto out_cleanup;

return 0;

out_cleanup:
input_free_device(hidinput->input);
kfree(hidinput);
out_unwind:
/* unwind the ones we already registered */
hidinput_disconnect(hid);

return -1;
}
EXPORT_SYMBOL_GPL(hidinput_connect);

Expand Down

0 comments on commit 8ae5002

Please sign in to comment.