linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Coelho, Luciano" <luciano.coelho@intel.com>
To: "jiapeng.chong@linux.alibaba.com" <jiapeng.chong@linux.alibaba.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"kvalo@codeaurora.org" <kvalo@codeaurora.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kuba@kernel.org" <kuba@kernel.org>
Subject: Re: [PATCH] wlwifi: Fix missing error code in iwl_pci_probe()
Date: Fri, 29 Oct 2021 19:44:15 +0000	[thread overview]
Message-ID: <9dbaa72c86470e54c5ddf5476fb9569b4025be3e.camel@intel.com> (raw)
In-Reply-To: <1635501304-85589-1-git-send-email-jiapeng.chong@linux.alibaba.com>

On Fri, 2021-10-29 at 17:55 +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>
> ---
>  drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
> index cff76a528967..33250d24c2b9 100644
> --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
> +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
> @@ -1442,9 +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 for your patch!

The commit description makes sense.  But the patch itself is wrong.  It
seems to be fixing an earlier attempt at fixing the issue, where the
ret = -EINVAL was added, but the braces were missing (which is what
this patch adds).

So, this patch is incomplete and won't apply as is.  Can you please fix
it?

--
Luca.

      parent reply	other threads:[~2021-10-29 19:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29  9:55 Jiapeng Chong
2021-10-29 13:04 ` Kalle Valo
2021-10-29 19:44 ` Coelho, Luciano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9dbaa72c86470e54c5ddf5476fb9569b4025be3e.camel@intel.com \
    --to=luciano.coelho@intel.com \
    --cc=davem@davemloft.net \
    --cc=jiapeng.chong@linux.alibaba.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH] wlwifi: Fix missing error code in iwl_pci_probe()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).