Skip to content

Commit

Permalink
Fix input device error handling
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
crawfxrd authored and jackpot51 committed Dec 21, 2021
1 parent b49caa5 commit a02b101
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions system76_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a02b101

Please sign in to comment.