diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2021-06-15 17:21:55 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-16 12:02:38 -0700 |
commit | 61273f9d83148a38cf9b78d43016c29fc80f48e5 (patch) | |
tree | 3319873240d909ac41951a8941bb83b273e1a333 /drivers/net/ethernet/stmicro | |
parent | c7654495916e109f76a67fd3ae68f8fa70ab4faa (diff) | |
download | linux-61273f9d83148a38cf9b78d43016c29fc80f48e5.tar.gz linux-61273f9d83148a38cf9b78d43016c29fc80f48e5.tar.bz2 linux-61273f9d83148a38cf9b78d43016c29fc80f48e5.zip |
net: stmmac: Fix error return code in ingenic_mac_probe()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 2bb4b98b60d7 ("net: stmmac: Add Ingenic SoCs MAC support.")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c index 60984c1a154d..9a6d819b84ae 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c @@ -263,6 +263,7 @@ static int ingenic_mac_probe(struct platform_device *pdev) mac->regmap = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, "mode-reg"); if (IS_ERR(mac->regmap)) { dev_err(&pdev->dev, "%s: Failed to get syscon regmap\n", __func__); + ret = PTR_ERR(mac->regmap); goto err_remove_config_dt; } |