From 1ebe62bec4120fd79967edbe990f2eea285a6e80 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sat, 4 Sep 2021 17:55:26 +0000 Subject: [PATCH] platform/x86: wmi: remove unnecessary checks MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Link: https://lore.kernel.org/r/20210904175450.156801-11-pobrn@protonmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- drivers/platform/x86/wmi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 1ae42dcb4036f..147cc5086f2ab 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; -- 2.30.2