All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] iwlwifi: support per-platform antenna gain
@ 2019-09-19 14:29 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-09-19 14:29 UTC (permalink / raw)
  To: gil.adam; +Cc: linux-wireless

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-19 14:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-19 14:29 [bug report] iwlwifi: support per-platform antenna gain Dan Carpenter

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.