From: Tim Crawford Date: Sat, 30 Oct 2021 15:42:13 +0000 (-0600) Subject: platform/x86: system76_acpi: Fix input device error handling X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=97ae45953ea957887170078f488fd629dd1ce786;p=linux.git platform/x86: system76_acpi: Fix input device error handling Users on darp6 that do not have Open EC firmware have reported crashes on boot. Correct the error handling for the input device to fix it. Managed devices do not need to be explicitly unregistered or freed, as this is handled by devres. Drop the call to input_free_device. Fixes: 0de30fc684b3 ("platform/x86: system76_acpi: Replace Fn+F2 function for OLED models") Signed-off-by: Tim Crawford Link: https://lore.kernel.org/r/20211030154213.2515-1-tcrawford@system76.com Signed-off-by: Hans de Goede --- diff --git a/drivers/platform/x86/system76_acpi.c b/drivers/platform/x86/system76_acpi.c index b3c8178420b1a..8b292ee95a144 100644 --- a/drivers/platform/x86/system76_acpi.c +++ b/drivers/platform/x86/system76_acpi.c @@ -739,7 +739,6 @@ static int system76_add(struct acpi_device *acpi_dev) error: kfree(data->ntmp); kfree(data->nfan); - input_free_device(data->input); return err; }