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 <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
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:
--
2.45.0