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:
Tim Crawford 2021-10-30 09:44:04 -06:00 committed by Jeremy Soller
parent b49caa557e
commit a02b101be8
1 changed files with 2 additions and 4 deletions

View File

@ -732,10 +732,8 @@ static int system76_add(struct acpi_device *acpi_dev)
input_set_capability(data->input, EV_KEY, KEY_SCREENLOCK);
err = input_register_device(data->input);
if (err) {
input_free_device(data->input);
return err;
}
if (err)
goto error;
err = system76_get_object(data, "NFAN", &data->nfan);
if (err)