]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
platform/x86: acer-wmi: Drop no-op set_quirks call from find_quirks
authorHans de Goede <hdegoede@redhat.com>
Mon, 19 Oct 2020 18:56:23 +0000 (20:56 +0200)
committerHans de Goede <hdegoede@redhat.com>
Wed, 28 Oct 2020 11:56:51 +0000 (12:56 +0100)
set_quirks has a "if (!interface) return;" check at its beginning and
interface always is NULL when set_quirks is called from find_quirks,
so it is a no-op and we can drop it.

This also allows dropping the "if (!interface) return;" from set_quirks
since set_quirks now always is called with interface != NULL.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20201019185628.264473-1-hdegoede@redhat.com
drivers/platform/x86/acer-wmi.c

index 1c2084c74a5704a961dee397dba40e486f44d281..486186799886680729df84bd99a5d29b6ffc257e 100644 (file)
@@ -302,9 +302,6 @@ static struct quirk_entry *quirks;
 
 static void __init set_quirks(void)
 {
-       if (!interface)
-               return;
-
        if (quirks->mailled)
                interface->capability |= ACER_CAP_MAILLED;
 
@@ -648,8 +645,6 @@ static void __init find_quirks(void)
 
        if (quirks == NULL)
                quirks = &quirk_unknown;
-
-       set_quirks();
 }
 
 /*