From: Barnabás Pőcze Date: Sat, 4 Sep 2021 17:55:26 +0000 (+0000) Subject: platform/x86: wmi: remove unnecessary checks X-Git-Tag: v5.16-rc1~139^2~94 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1ebe62bec4120fd79967edbe990f2eea285a6e80;p=linux-platform-drivers-x86.git 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 Link: https://lore.kernel.org/r/20210904175450.156801-11-pobrn@protonmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- 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;