Skip to content

Commit 1b54403

Browse files
chongjiapengKalle Valo
authored andcommitted
iwlwifi: Fix missing error code in iwl_pci_probe()
The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'ret'. Eliminate the follow smatch warning: drivers/net/wireless/intel/iwlwifi/pcie/drv.c:1376 iwl_pci_probe() warn: missing error code 'ret'. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Fixes: 1f171f4 ("iwlwifi: Add support for getting rf id with blank otp") Signed-off-by: chongjiapeng <jiapeng.chong@linux.alibaba.com> Acked-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1635838727-128735-1-git-send-email-jiapeng.chong@linux.alibaba.com
1 parent fe785f5 commit 1b54403

File tree

1 file changed

+3
-1
lines changed
  • drivers/net/wireless/intel/iwlwifi/pcie

1 file changed

+3
-1
lines changed

drivers/net/wireless/intel/iwlwifi/pcie/drv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1446,8 +1446,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
14461446
*/
14471447
if (iwl_trans->trans_cfg->rf_id &&
14481448
iwl_trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_9000 &&
1449-
!CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id) && get_crf_id(iwl_trans))
1449+
!CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id) && get_crf_id(iwl_trans)) {
1450+
ret = -EINVAL;
14501451
goto out_free_trans;
1452+
}
14511453

14521454
dev_info = iwl_pci_find_dev_info(pdev->device, pdev->subsystem_device,
14531455
CSR_HW_REV_TYPE(iwl_trans->hw_rev),

0 commit comments

Comments
 (0)