linux/drivers/platform/surface
Christophe JAILLET 34fc683485 platform/surface: surface3-wmi: Simplify resource management
's3_wmi.input' is a managed resource, so there should be no need to free it
explicitly.

Moreover, 's3_wmi' is a global variable. 's3_wmi.input' should be NULL
when this error handling path is executed, because it has not been
assigned yet.

All this is puzzling. So simplify it and remove a few lines of code to have
it be more straightforward.

Fixes: 3dda3b3798 ("platform/x86: Add custom surface3 platform device for controlling LID")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/8b1a6d05036d5d9527241b2345482b369331ce5c.1643531799.git.christophe.jaillet@wanadoo.fr
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2022-02-03 11:56:04 +01:00
..
aggregator platform: surface: Propagate ACPI Dependency 2021-12-07 12:21:01 +01:00
Kconfig platform/surface: Reinstate platform dependency 2022-01-24 10:41:45 +01:00
Makefile platform/surface: Add DTX driver 2021-03-17 18:39:38 +01:00
surface3_button.c platform/surface: Move Surface 3 Button driver to platform/surface 2020-10-27 12:51:24 +01:00
surface3_power.c surface: surface3_power: Drop redundant acpi_bus_get_device() call 2021-10-19 16:55:53 +02:00
surface3-wmi.c platform/surface: surface3-wmi: Simplify resource management 2022-02-03 11:56:04 +01:00
surface_acpi_notify.c platform/surface: Replace acpi_bus_get_device() 2022-02-03 11:56:01 +01:00
surface_aggregator_cdev.c platform/surface: aggregator_cdev: Add lockdep support 2021-06-16 17:47:53 +02:00
surface_aggregator_registry.c platform/surface: aggregator_registry: Rename device registration function 2021-11-16 10:56:54 +01:00
surface_dtx.c platform/surface: dtx: Add missing mutex_destroy() call in failure path 2021-06-16 17:47:52 +02:00
surface_gpe.c platform/surface: gpe: Add support for Surface Laptop Studio 2021-10-21 20:36:18 +02:00
surface_hotplug.c platform/surface: Add Surface Hot-Plug driver 2021-02-08 16:59:21 +01:00
surface_platform_profile.c platform/surface: aggregator: Make SSAM_DEFINE_SYNC_REQUEST_x define static functions 2021-03-08 11:33:28 +01:00
surfacepro3_button.c platform: x86: ACPI: Get rid of ACPICA message printing 2021-03-08 11:33:39 +01:00