From: Dmitry Antipov <dmantipov@yandex.ru>
To: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Cc: Kalle Valo <kvalo@kernel.org>,
linux-wireless@vger.kernel.org, lvc-project@linuxtesting.org,
Dmitry Antipov <dmantipov@yandex.ru>
Subject: [PATCH] wifi: iwlwifi: fw: remove dead branch in iwl_acpi_get_wgds_table()
Date: Mon, 13 May 2024 11:36:11 +0300 [thread overview]
Message-ID: <20240513083611.49064-1-dmantipov@yandex.ru> (raw)
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 --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
reply other threads:[~2024-05-13 8:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240513083611.49064-1-dmantipov@yandex.ru \
--to=dmantipov@yandex.ru \
--cc=kvalo@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=miriam.rachel.korenblit@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).