[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <93e2a980e9cacb160cc73b4c4589c88f807fa7bd.camel@intel.com>
Date: Tue, 2 Nov 2021 07:55:50 +0000
From: "Coelho, Luciano" <luciano.coelho@...el.com>
To: "jiapeng.chong@...ux.alibaba.com" <jiapeng.chong@...ux.alibaba.com>
CC: "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"kvalo@...eaurora.org" <kvalo@...eaurora.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kuba@...nel.org" <kuba@...nel.org>
Subject: Re: [PATCH v2] iwlwifi: Fix missing error code in iwl_pci_probe()
On Tue, 2021-11-02 at 15:38 +0800, Jiapeng Chong wrote:
> From: chongjiapeng <jiapeng.chong@...ux.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@...ux.alibaba.com>
> Fixes: 1f171f4f1437 ("iwlwifi: Add support for getting rf id with blank otp")
> Signed-off-by: chongjiapeng <jiapeng.chong@...ux.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@...el.com>
--
Cheers,
Luca.
Powered by blists - more mailing lists