]> www.infradead.org Git - linux-platform-drivers-x86.git/commitdiff
platform/x86: wmi: remove unnecessary checks
authorBarnabás Pőcze <pobrn@protonmail.com>
Sat, 4 Sep 2021 17:55:26 +0000 (17:55 +0000)
committerHans de Goede <hdegoede@redhat.com>
Tue, 14 Sep 2021 10:26:01 +0000 (12:26 +0200)
The `find_guid_context()` is only called from one place,
and `wblock` and `wdriver` cannot be NULL there.
So remove the currently redundant checks.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Link: https://lore.kernel.org/r/20210904175450.156801-11-pobrn@protonmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/wmi.c

index 1ae42dcb4036f544705c065dcc3a789babb4db8e..147cc5086f2ab4ee28948495a4610fa2afc7f122 100644 (file)
@@ -135,8 +135,6 @@ static const void *find_guid_context(struct wmi_block *wblock,
        const struct wmi_device_id *id;
        guid_t guid_input;
 
-       if (wblock == NULL || wdriver == NULL)
-               return NULL;
        if (wdriver->id_table == NULL)
                return NULL;