[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200508021059.172001-1-weiyongjun1@huawei.com>
Date: Fri, 8 May 2020 02:10:59 +0000
From: Wei Yongjun <weiyongjun1@...wei.com>
To: "David S . Miller" <davem@...emloft.net>,
Grygorii Strashko <grygorii.strashko@...com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Colin Ian King <colin.king@...onical.com>,
Jakub Kicinski <kuba@...nel.org>
CC: Wei Yongjun <weiyongjun1@...wei.com>, <netdev@...r.kernel.org>,
<kernel-janitors@...r.kernel.org>, Hulk Robot <hulkci@...wei.com>
Subject: [PATCH net-next] net: ethernet: ti: fix error return code in am65_cpsw_nuss_probe()
Fix to return negative error code -ENOMEM from the cpsw_ale_create()
error handling case instead of 0, as done elsewhere in this function.
Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
drivers/net/ethernet/ti/am65-cpsw-nuss.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index f8c589929308..066ba52f57cb 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -2065,6 +2065,7 @@ static int am65_cpsw_nuss_probe(struct platform_device *pdev)
common->ale = cpsw_ale_create(&ale_params);
if (!common->ale) {
dev_err(dev, "error initializing ale engine\n");
+ ret = -ENOMEM;
goto err_of_clear;
}
Powered by blists - more mailing lists