summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ti/am65-cpsw-nuss.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-05-21 17:14:18 -0700
committerDavid S. Miller <davem@davemloft.net>2020-05-21 17:14:18 -0700
commit04ba6b7dd8cadeb8ffdc4cba144024c3dad6a6ac (patch)
tree341f692f29bf8bc3c19ab133fd3a09951d259653 /drivers/net/ethernet/ti/am65-cpsw-nuss.c
parentd28ea1fbbf437054ef339afec241019f2c4e2bb6 (diff)
parent1401cf600d548c72f51e20b5841c330d5c11c9e2 (diff)
Merge branch 'net-ethernet-ti-fix-some-return-value-check'
Wei Yongjun says: ==================== net: ethernet: ti: fix some return value check This patchset convert cpsw_ale_create() to return PTR_ERR() only, and changed all the caller to check IS_ERR() instead of NULL. Since v2: 1) rebased on net.git, as Jakub's suggest 2) split am65-cpsw-nuss.c changes, as Grygorii's suggest ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/am65-cpsw-nuss.c')
-rw-r--r--drivers/net/ethernet/ti/am65-cpsw-nuss.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 2517ffba8178..88f52a2f85b3 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -1895,8 +1895,9 @@ static int am65_cpsw_nuss_probe(struct platform_device *pdev)
ale_params.nu_switch_ale = true;
common->ale = cpsw_ale_create(&ale_params);
- if (!common->ale) {
+ if (IS_ERR(common->ale)) {
dev_err(dev, "error initializing ale engine\n");
+ ret = PTR_ERR(common->ale);
goto err_of_clear;
}