[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1605250173-18438-1-git-send-email-zhangchangzhong@huawei.com>
Date: Fri, 13 Nov 2020 14:49:33 +0800
From: Zhang Changzhong <zhangchangzhong@...wei.com>
To: <grygorii.strashko@...com>, <davem@...emloft.net>,
<kuba@...nel.org>, <m-karicheri2@...com>, <brouer@...hat.com>,
<richardcochran@...il.com>, <yanaijie@...wei.com>
CC: <linux-omap@...r.kernel.org>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH net] net: ethernet: ti: cpsw: fix error return code in cpsw_probe()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@...wei.com>
---
drivers/net/ethernet/ti/cpsw.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 9fd1f77..7882a00 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1631,6 +1631,7 @@ static int cpsw_probe(struct platform_device *pdev)
CPSW_MAX_QUEUES, CPSW_MAX_QUEUES);
if (!ndev) {
dev_err(dev, "error allocating net_device\n");
+ ret = -ENOMEM;
goto clean_cpts;
}
--
2.9.5
Powered by blists - more mailing lists