|
@@ -355,7 +355,6 @@ static int quickstart_acpi_remove(struct acpi_device *device, int type)
|
|
static void quickstart_exit(void)
|
|
static void quickstart_exit(void)
|
|
{
|
|
{
|
|
input_unregister_device(quickstart_input);
|
|
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_pressed_button);
|
|
device_remove_file(&pf_device->dev, &dev_attr_buttons);
|
|
device_remove_file(&pf_device->dev, &dev_attr_buttons);
|
|
@@ -375,6 +374,7 @@ static int __init quickstart_init_input(void)
|
|
{
|
|
{
|
|
struct quickstart_btn **ptr = &quickstart_data.btn_lst;
|
|
struct quickstart_btn **ptr = &quickstart_data.btn_lst;
|
|
int count;
|
|
int count;
|
|
|
|
+ int ret;
|
|
|
|
|
|
quickstart_input = input_allocate_device();
|
|
quickstart_input = input_allocate_device();
|
|
|
|
|
|
@@ -391,7 +391,13 @@ static int __init quickstart_init_input(void)
|
|
ptr = &((*ptr)->next);
|
|
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)
|
|
static int __init quickstart_init(void)
|