diff mbox series

[RFC,v1,10/30] platform/x86: wmi: remove unnecessary checks

Message ID 20210904175450.156801-11-pobrn@protonmail.com (mailing list archive)
State Accepted, archived
Headers show
Series platform/x86: wmi: minor improvements | expand

Commit Message

Barnabás Pőcze Sept. 4, 2021, 5:55 p.m. UTC
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>
---
 drivers/platform/x86/wmi.c | 2 --
 1 file changed, 2 deletions(-)

--
2.33.0
diff mbox series

Patch

diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 42cc83cf117f..46ebc4e421b4 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;