From: Dan Carpenter <dan.carpenter@oracle.com>
To: gil.adam@intel.com
Cc: linux-wireless@vger.kernel.org
Subject: [bug report] iwlwifi: support per-platform antenna gain
Date: Thu, 19 Sep 2019 17:29:57 +0300 [thread overview]
Message-ID: <20190919142957.GA3554@mwanda> (raw)
Hello Gil Adam,
The patch 6ce1e5c0c207: "iwlwifi: support per-platform antenna gain"
from Jun 16, 2019, leads to the following static checker warning:
drivers/net/wireless/intel/iwlwifi/mvm/fw.c:1022 iwl_mvm_get_ppag_table()
warn: passing a valid pointer to 'PTR_ERR'
drivers/net/wireless/intel/iwlwifi/mvm/fw.c
1007 static int iwl_mvm_get_ppag_table(struct iwl_mvm *mvm)
1008 {
1009 union acpi_object *wifi_pkg, *data, *enabled;
1010 int i, j, ret, tbl_rev;
1011 int idx = 2;
1012
1013 mvm->ppag_table.enabled = cpu_to_le32(0);
1014 data = iwl_acpi_get_object(mvm->dev, ACPI_PPAG_METHOD);
1015 if (IS_ERR(data))
1016 return PTR_ERR(data);
1017
1018 wifi_pkg = iwl_acpi_get_wifi_pkg(mvm->dev, data,
1019 ACPI_PPAG_WIFI_DATA_SIZE, &tbl_rev);
1020
1021 if (IS_ERR(wifi_pkg) || tbl_rev != 0) {
^^^^^^^^^^^^
Should we set the error code if "tbl_rev" is wrong?
1022 ret = PTR_ERR(wifi_pkg);
1023 goto out_free;
1024 }
1025
1026 enabled = &wifi_pkg->package.elements[1];
1027 if (enabled->type != ACPI_TYPE_INTEGER ||
1028 (enabled->integer.value != 0 && enabled->integer.value != 1)) {
1029 ret = -EINVAL;
1030 goto out_free;
1031 }
regards,
dan carpenter
reply other threads:[~2019-09-19 14:30 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=20190919142957.GA3554@mwanda \
--to=dan.carpenter@oracle.com \
--cc=gil.adam@intel.com \
--cc=linux-wireless@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.