* [PATCH v2] iwlwifi: Fix missing error code in iwl_pci_probe()
@ 2021-11-02 7:38 Jiapeng Chong
2021-11-02 7:55 ` Coelho, Luciano
2021-11-22 18:37 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Jiapeng Chong @ 2021-11-02 7:38 UTC (permalink / raw)
To: luciano.coelho
Cc: kvalo, davem, kuba, linux-wireless, netdev, linux-kernel, chongjiapeng
From: chongjiapeng <jiapeng.chong@linux.alibaba.com>
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: 1f171f4f1437 ("iwlwifi: Add support for getting rf id with blank otp")
Signed-off-by: chongjiapeng <jiapeng.chong@linux.alibaba.com>
---
Changes in v2:
-For the following advice:
https://lore.kernel.org/lkml/9dbaa72c86470e54c5ddf5476fb9569b4025be3e.camel@intel.com/
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index c574f041f096..33250d24c2b9 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -1442,8 +1442,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
*/
if (iwl_trans->trans_cfg->rf_id &&
iwl_trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_9000 &&
- !CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id) && get_crf_id(iwl_trans))
+ !CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id) && get_crf_id(iwl_trans)) {
+ ret = -EINVAL;
goto out_free_trans;
+ }
dev_info = iwl_pci_find_dev_info(pdev->device, pdev->subsystem_device,
CSR_HW_REV_TYPE(iwl_trans->hw_rev),
--
2.19.1.6.gb485710b
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] iwlwifi: Fix missing error code in iwl_pci_probe()
2021-11-02 7:38 [PATCH v2] iwlwifi: Fix missing error code in iwl_pci_probe() Jiapeng Chong
@ 2021-11-02 7:55 ` Coelho, Luciano
2021-11-22 18:37 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Coelho, Luciano @ 2021-11-02 7:55 UTC (permalink / raw)
To: jiapeng.chong; +Cc: linux-wireless, netdev, kvalo, davem, linux-kernel, kuba
On Tue, 2021-11-02 at 15:38 +0800, Jiapeng Chong wrote:
> From: chongjiapeng <jiapeng.chong@linux.alibaba.com>
>
> 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: 1f171f4f1437 ("iwlwifi: Add support for getting rf id with blank otp")
> Signed-off-by: chongjiapeng <jiapeng.chong@linux.alibaba.com>
> ---
> Changes in v2:
> -For the following advice:
> https://lore.kernel.org/lkml/9dbaa72c86470e54c5ddf5476fb9569b4025be3e.camel@intel.com/
>
> drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
> index c574f041f096..33250d24c2b9 100644
> --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
> +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
> @@ -1442,8 +1442,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> */
> if (iwl_trans->trans_cfg->rf_id &&
> iwl_trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_9000 &&
> - !CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id) && get_crf_id(iwl_trans))
> + !CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id) && get_crf_id(iwl_trans)) {
> + ret = -EINVAL;
> goto out_free_trans;
> + }
>
> dev_info = iwl_pci_find_dev_info(pdev->device, pdev->subsystem_device,
> CSR_HW_REV_TYPE(iwl_trans->hw_rev),
Thanks!
Kalle, can you pick this up for wireless-drivers.git? I have assigned
it to you in patchwork.
Acked-by: Luca Coelho <luciano.coelho@intel.com>
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] iwlwifi: Fix missing error code in iwl_pci_probe()
2021-11-02 7:38 [PATCH v2] iwlwifi: Fix missing error code in iwl_pci_probe() Jiapeng Chong
2021-11-02 7:55 ` Coelho, Luciano
@ 2021-11-22 18:37 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-11-22 18:37 UTC (permalink / raw)
To: Jiapeng Chong
Cc: luciano.coelho, davem, kuba, linux-wireless, netdev,
linux-kernel, chongjiapeng
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:
> From: chongjiapeng <jiapeng.chong@linux.alibaba.com>
>
> 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: 1f171f4f1437 ("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>
Patch applied to wireless-drivers.git, thanks.
1b54403c9cc4 iwlwifi: Fix missing error code in iwl_pci_probe()
--
https://patchwork.kernel.org/project/linux-wireless/patch/1635838727-128735-1-git-send-email-jiapeng.chong@linux.alibaba.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-22 18:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 7:38 [PATCH v2] iwlwifi: Fix missing error code in iwl_pci_probe() Jiapeng Chong
2021-11-02 7:55 ` Coelho, Luciano
2021-11-22 18:37 ` Kalle Valo
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.