Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3930089pxb; Tue, 2 Nov 2021 00:39:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxqzUBhOvyFo97doxaat4fPLWo+ddGSCCBVom3Tn5pjvFS1R+J9R/c1JPIKaR1RvAqnRki X-Received: by 2002:a05:6402:4401:: with SMTP id y1mr9595407eda.225.1635838761229; Tue, 02 Nov 2021 00:39:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635838761; cv=none; d=google.com; s=arc-20160816; b=rW5Nr7cb6c+8GtRgru4lrFqH3i1daLi4xUI5h08yvE3taQQ5VI7dMm+e60DI4SFJSm AaqSQoRAHUZMit68TX+28gD9eE3mvhqvfXyW2QwdmlAiukccA3Qkx28UXagCBm9tW6jS czFhnjMLRK5Miz24ZHUm0t3+yImKyVLhsV0yVaXAGCdX53wlsCpeUvjKjGnrYRipzzbI /1D0gPn21cDJUuNz75lRK7SoYOVta8QXpFqQ7Dqyy3WCnFiQDUl3vwCxiLMxbFLoQSbL tGyYoMHuIWVtb1G+17Sh/61jBajh6+XJeL/AwkhEJeKlTAY3db8uI2Mx+0IPjsjhHmen ycfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=qa90BZJowuMp8+Nn1VpXke347RMwbu87KGuHmUb1Bo8=; b=heBDxkQ0sHU0HjGNpJxGY00ttBY76NZ0cVinZD1P8jl9hBb2gEQxiZgu40riNZfZLY whRqU+g3fvGDjf7WKZrOSChg8TS9nQ/4ERy6xVHaa5f9ZAc94FxHAvsGYkt7lfVCJtsQ +ztj08gHmeS0x2zDTPiOOQhMuvZp4Xa1yoki8m93Al2F1wcmIkmrSiZ3dDxXJ17FYWvv B3hRY8tEraJKbkN06vQg8ie+/Snr9NQQRDcEe7RGJYIeUvIX5XB+JKFgesyVU1Y8vpt0 h5bcrYom+C4QqpkYs5OdCHZdLO8CEB63ZgjEhLFw26U+w1L+/10xe1pxWbTrBSrsA36c OwJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i25si25127862ejd.303.2021.11.02.00.39.01; Tue, 02 Nov 2021 00:39:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230109AbhKBHlb (ORCPT + 66 others); Tue, 2 Nov 2021 03:41:31 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:37888 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229720AbhKBHlb (ORCPT ); Tue, 2 Nov 2021 03:41:31 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R531e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UuiTMnR_1635838731; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UuiTMnR_1635838731) by smtp.aliyun-inc.com(127.0.0.1); Tue, 02 Nov 2021 15:38:54 +0800 From: Jiapeng Chong To: luciano.coelho@intel.com Cc: kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, chongjiapeng Subject: [PATCH v2] iwlwifi: Fix missing error code in iwl_pci_probe() Date: Tue, 2 Nov 2021 15:38:47 +0800 Message-Id: <1635838727-128735-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: chongjiapeng 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 Fixes: 1f171f4f1437 ("iwlwifi: Add support for getting rf id with blank otp") Signed-off-by: chongjiapeng --- 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