Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 222842
b: refs/heads/master
c: ebba26f
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Nov 16, 2010
1 parent 424ea6b commit 66b7881
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: 5fb5d38fc268b8285125b213b9b2ded9322a371c
refs/heads/master: ebba26f4a8d0c137a2d365b6bded2a0d7fcd1d06
10 changes: 8 additions & 2 deletions trunk/drivers/staging/quickstart/quickstart.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ static int quickstart_acpi_remove(struct acpi_device *device, int type)
static void quickstart_exit(void)
{
input_unregister_device(quickstart_input);
input_free_device(quickstart_input);

device_remove_file(&pf_device->dev, &dev_attr_pressed_button);
device_remove_file(&pf_device->dev, &dev_attr_buttons);
Expand All @@ -375,6 +374,7 @@ static int __init quickstart_init_input(void)
{
struct quickstart_btn **ptr = &quickstart_data.btn_lst;
int count;
int ret;

quickstart_input = input_allocate_device();

Expand All @@ -391,7 +391,13 @@ static int __init quickstart_init_input(void)
ptr = &((*ptr)->next);
}

return input_register_device(quickstart_input);
ret = input_register_device(quickstart_input);
if (ret) {
input_free_device(quickstart_input);
return ret;
}

return 0;
}

static int __init quickstart_init(void)
Expand Down

0 comments on commit 66b7881

Please sign in to comment.