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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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 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;

--
2.33.0






[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux