Skip to contentSkip to conversation

platform/x86: wmi: remove unnecessary checks

RFC PATCH In review Barnabás Pőcze 1 participant 1 message Sep 4, 2021 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

RFC PATCH 10/30 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.

---
 drivers/platform/x86/wmi.c | 2 --
 1 file changed, 2 deletions(-)
drivers/platform/x86/wmi.c +0 -2
index 42cc83cf117f..46ebc4e421b4 100644
@@ -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.33.0