Fix input device error handling
Managed devices do not need to be explicitly unregistered or freed, as this is handled by devres. Drop the call to input_free_device. Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
parent
b49caa557e
commit
a02b101be8
|
|
@ -732,10 +732,8 @@ static int system76_add(struct acpi_device *acpi_dev)
|
||||||
input_set_capability(data->input, EV_KEY, KEY_SCREENLOCK);
|
input_set_capability(data->input, EV_KEY, KEY_SCREENLOCK);
|
||||||
|
|
||||||
err = input_register_device(data->input);
|
err = input_register_device(data->input);
|
||||||
if (err) {
|
if (err)
|
||||||
input_free_device(data->input);
|
goto error;
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
err = system76_get_object(data, "NFAN", &data->nfan);
|
err = system76_get_object(data, "NFAN", &data->nfan);
|
||||||
if (err)
|
if (err)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue