Skip to content
Commit 34fc6834 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Hans de Goede
Browse files

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: 3dda3b37 ("platform/x86: Add custom surface3 platform device for controlling LID")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarMaximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/8b1a6d05036d5d9527241b2345482b369331ce5c.1643531799.git.christophe.jaillet@wanadoo.fr


Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 6768bddb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment