[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1615791117-56711-1-git-send-email-f.fangjian@huawei.com>
Date: Mon, 15 Mar 2021 14:51:57 +0800
From: Jay Fang <f.fangjian@...wei.com>
To: <manishc@...vell.com>, <GR-Linux-NIC-Dev@...vell.com>
CC: <netdev@...r.kernel.org>, <dan.carpenter@...cle.com>,
<huangdaode@...wei.com>
Subject: [PATCH] staging: qlge : fix missing error codes
From: Zihao Tang <tangzihao1@...ilicon.com>
Fixes one smatch warnings:
drivers/staging/qlge/qlge_main.c:4564 qlge_probe() warn: missing error code 'err'
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Zihao Tang <tangzihao1@...ilicon.com>
Signed-off-by: Jay Fang <f.fangjian@...wei.com>
---
drivers/staging/qlge/qlge_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index 5516be3..44b7724 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -4561,8 +4561,10 @@ static int qlge_probe(struct pci_dev *pdev,
ndev = alloc_etherdev_mq(sizeof(struct qlge_netdev_priv),
min(MAX_CPUS,
netif_get_num_default_rss_queues()));
- if (!ndev)
+ if (!ndev) {
+ err = -ENOMEM;
goto devlink_free;
+ }
ndev_priv = netdev_priv(ndev);
ndev_priv->qdev = qdev;
--
2.7.4
Powered by blists - more mailing lists