Search Linux Wireless

[bug report] iwlwifi: support per-platform antenna gain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux