From: Dan Carpenter <dan.carpenter@linaro.org>
To: Matt Chen <matt.chen@intel.com>
Cc: Miri Korenblit <miriam.rachel.korenblit@intel.com>,
Kalle Valo <kvalo@kernel.org>,
Johannes Berg <johannes.berg@intel.com>,
Gregory Greenman <gregory.greenman@intel.com>,
Alon Giladi <alon.giladi@intel.com>,
Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>,
Daniel Gabay <daniel.gabay@intel.com>,
Luca Coelho <luciano.coelho@intel.com>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH 2/2] wifi: iwlwifi: uninitialized variable in iwl_acpi_get_ppag_table()
Date: Thu, 8 Feb 2024 13:17:31 +0300 [thread overview]
Message-ID: <09900c01-6540-4a32-9451-563da0029cb6@moroto.mountain> (raw)
In-Reply-To: <9620bb77-2d7c-4d76-b255-ad824ebf8e35@moroto.mountain>
This is an error path and Smatch complains that "tbl_rev" is uninitialized
on this path. All the other functions follow this same patter where they
set the error code and goto out_free so that's probably what was intended
here as well.
Fixes: e8e10a37c51c ("iwlwifi: acpi: move ppag code from mvm to fw/acpi")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
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 506279b95442..6806ac1636ca 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
@@ -848,6 +848,9 @@ int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt)
goto read_table;
}
+ ret = PTR_ERR(wifi_pkg);
+ goto out_free;
+
read_table:
fwrt->ppag_ver = tbl_rev;
flags = &wifi_pkg->package.elements[1];
--
2.43.0
prev parent reply other threads:[~2024-02-08 10:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 10:17 [PATCH 1/2] wifi: iwlwifi: Fix some error codes Dan Carpenter
2024-02-08 10:17 ` Dan Carpenter [this message]
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=09900c01-6540-4a32-9451-563da0029cb6@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=alon.giladi@intel.com \
--cc=daniel.gabay@intel.com \
--cc=gregory.greenman@intel.com \
--cc=johannes.berg@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.com \
--cc=matt.chen@intel.com \
--cc=miriam.rachel.korenblit@intel.com \
--cc=pagadala.yesu.anjaneyulu@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
all inboxes | Powered by JetHome®