[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1468414000-2860-1-git-send-email-weiyj_lk@163.com>
Date: Wed, 13 Jul 2016 12:46:40 +0000
From: weiyj_lk@....com
To: Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...com>
Cc: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>, netdev@...r.kernel.org
Subject: [PATCH -next] stmmac: dwmac-socfpga: remove redundant dev_err call in socfpga_dwmac_parse_data()
From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index 3bc1fa2..edd20c3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -165,12 +165,8 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *
dwmac->splitter_base =
devm_ioremap_resource(dev, &res_splitter);
- if (IS_ERR(dwmac->splitter_base)) {
- dev_err(dev,
- "%s: ERROR: failed mapping emac splitter\n",
- __func__);
+ if (IS_ERR(dwmac->splitter_base))
return PTR_ERR(dwmac->splitter_base);
- }
}
index = of_property_match_string(np_sgmii_adapter, "reg-names",
@@ -188,11 +184,8 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *
dwmac->pcs.sgmii_adapter_base =
devm_ioremap_resource(dev, &res_sgmii_adapter);
- if (IS_ERR(dwmac->pcs.sgmii_adapter_base)) {
- dev_err(dev, "%s: failed to mapping adapter\n",
- __func__);
+ if (IS_ERR(dwmac->pcs.sgmii_adapter_base))
return PTR_ERR(dwmac->pcs.sgmii_adapter_base);
- }
}
index = of_property_match_string(np_sgmii_adapter, "reg-names",
@@ -210,12 +203,8 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *
dwmac->pcs.tse_pcs_base =
devm_ioremap_resource(dev, &res_tse_pcs);
- if (IS_ERR(dwmac->pcs.tse_pcs_base)) {
- dev_err(dev,
- "%s: ERROR: failed mapping tse control port\n",
- __func__);
+ if (IS_ERR(dwmac->pcs.tse_pcs_base))
return PTR_ERR(dwmac->pcs.tse_pcs_base);
- }
}
}
dwmac->reg_offset = reg_offset;
Powered by blists - more mailing lists