|
@@ -383,7 +383,7 @@ static int alps_input_configured(struct hid_device *hdev, struct hid_input *hi)
|
|
|
|
|
|
input2 = input_allocate_device();
|
|
input2 = input_allocate_device();
|
|
if (!input2) {
|
|
if (!input2) {
|
|
- input_free_device(input2);
|
|
|
|
|
|
+ ret = -ENOMEM;
|
|
goto exit;
|
|
goto exit;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -425,7 +425,8 @@ static int alps_input_configured(struct hid_device *hdev, struct hid_input *hi)
|
|
__set_bit(INPUT_PROP_POINTER, input2->propbit);
|
|
__set_bit(INPUT_PROP_POINTER, input2->propbit);
|
|
__set_bit(INPUT_PROP_POINTING_STICK, input2->propbit);
|
|
__set_bit(INPUT_PROP_POINTING_STICK, input2->propbit);
|
|
|
|
|
|
- if (input_register_device(data->input2)) {
|
|
|
|
|
|
+ ret = input_register_device(data->input2);
|
|
|
|
+ if (ret) {
|
|
input_free_device(input2);
|
|
input_free_device(input2);
|
|
goto exit;
|
|
goto exit;
|
|
}
|
|
}
|