aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/wmi.c
diff options
context:
space:
mode:
authorBarnabás Pőcze <pobrn@protonmail.com>2021-09-04 17:55:26 +0000
committerHans de Goede <hdegoede@redhat.com>2021-09-14 12:26:01 +0200
commit1ebe62bec4120fd79967edbe990f2eea285a6e80 (patch)
tree7d5f9d3925ce3a39c2a4311e5546a0b356790664 /drivers/platform/x86/wmi.c
parentplatform/x86: wmi: remove stray empty line (diff)
downloadlinux-dev-1ebe62bec4120fd79967edbe990f2eea285a6e80.tar.xz
linux-dev-1ebe62bec4120fd79967edbe990f2eea285a6e80.zip
platform/x86: wmi: remove unnecessary checks
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>
Diffstat (limited to 'drivers/platform/x86/wmi.c')
-rw-r--r--drivers/platform/x86/wmi.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 1ae42dcb4036..147cc5086f2a 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -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;