diff mbox series

wifi: iwlwifi: fw: remove dead branch in iwl_acpi_get_wgds_table()

Message ID 20240513083611.49064-1-dmantipov@yandex.ru
State New
Headers show
Series wifi: iwlwifi: fw: remove dead branch in iwl_acpi_get_wgds_table() | expand

Commit Message

Dmitry Antipov May 13, 2024, 8:36 a.m. UTC
Since the first loop in iwl_acpi_get_wgds_table() always terminates
with 'idx == ARRAY_SIZE(rev_data)' unless one of goto branches is
taken, remove unreachable code. Compile tested only.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
index fa339791223b..7fb3cd06edbb 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
@@ -745,10 +745,7 @@  int iwl_acpi_get_wgds_table(struct iwl_fw_runtime *fwrt)
 		}
 	}
 
-	if (idx < ARRAY_SIZE(rev_data))
-		ret = PTR_ERR(wifi_pkg);
-	else
-		ret = -ENOENT;
+	ret = -ENOENT;
 	goto out_free;
 
 read_table: