diff mbox series

[RFC,v1,20/30] platform/x86: wmi: remove variable

Message ID 20210904175450.156801-21-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:56 p.m. UTC
The `block` variable is assigned and only used once, the code
shorter and probably clearer without it; so remove it.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
---
 drivers/platform/x86/wmi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--
2.33.0
diff mbox series

Patch

diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 7f7dfb7f9aa8..261a6b68240e 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -118,15 +118,12 @@  static bool find_guid(const char *guid_string, struct wmi_block **out)
 {
 	guid_t guid_input;
 	struct wmi_block *wblock;
-	struct guid_block *block;

 	if (guid_parse(guid_string, &guid_input))
 		return false;

 	list_for_each_entry(wblock, &wmi_block_list, list) {
-		block = &wblock->gblock;
-
-		if (guid_equal(&block->guid, &guid_input)) {
+		if (guid_equal(&wblock->gblock.guid, &guid_input)) {
 			if (out)
 				*out = wblock;
 			return true;