archive mirror
 help / color / mirror / Atom feed
From: Tom Rix <>
	Tom Rix <>
Subject: [PATCH] iwlwifi: mvm: return an error if setting tbl_rev fails
Date: Sat,  2 Jul 2022 11:10:20 -0400	[thread overview]
Message-ID: <> (raw)

clang static analysis reports
drivers/net/wireless/intel/iwlwifi/fw/acpi.c:1048:17: warning: Assigned value is garbage or undefined [core.uninitialized.Assign]
        fwrt->ppag_ver = tbl_rev;
                       ^ ~~~~~~~
tbl_rev is optionaly set by a series of calls to iwl_acpi_get_wifi_pkg()
and then jumping to the read_table when a call is successful.  The
error case when all the call fails is not handled.  On all failed,
the code flow falls through to the read_table label.  Add an error
handler for the all fail case.

Fixes: e8e10a37c51c ("iwlwifi: acpi: move ppag code from mvm to fw/acpi")
Signed-off-by: Tom Rix <>
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
index e6d64152c81a..1ef1e26c3206 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
@@ -1044,6 +1044,9 @@ int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt)
 		goto read_table;
+	ret = -EINVAL;
+	goto out_free;
 	fwrt->ppag_ver = tbl_rev;
 	flags = &wifi_pkg->package.elements[1];

             reply	other threads:[~2022-07-02 15:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-02 15:10 Tom Rix [this message]
2022-07-07 21:55 ` [PATCH] iwlwifi: mvm: return an error if setting tbl_rev fails Nick Desaulniers

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* 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 NNTP newsgroup(s).