Skip to content

Commit 3f30849

Browse files
Wei Yongjundavem330
authored andcommitted
stmmac: dwmac-socfpga: remove redundant dev_err call in socfpga_dwmac_parse_data()
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 484f674 commit 3f30849

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,8 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *
165165
dwmac->splitter_base =
166166
devm_ioremap_resource(dev, &res_splitter);
167167

168-
if (IS_ERR(dwmac->splitter_base)) {
169-
dev_err(dev,
170-
"%s: ERROR: failed mapping emac splitter\n",
171-
__func__);
168+
if (IS_ERR(dwmac->splitter_base))
172169
return PTR_ERR(dwmac->splitter_base);
173-
}
174170
}
175171

176172
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 *
188184
dwmac->pcs.sgmii_adapter_base =
189185
devm_ioremap_resource(dev, &res_sgmii_adapter);
190186

191-
if (IS_ERR(dwmac->pcs.sgmii_adapter_base)) {
192-
dev_err(dev, "%s: failed to mapping adapter\n",
193-
__func__);
187+
if (IS_ERR(dwmac->pcs.sgmii_adapter_base))
194188
return PTR_ERR(dwmac->pcs.sgmii_adapter_base);
195-
}
196189
}
197190

198191
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 *
210203
dwmac->pcs.tse_pcs_base =
211204
devm_ioremap_resource(dev, &res_tse_pcs);
212205

213-
if (IS_ERR(dwmac->pcs.tse_pcs_base)) {
214-
dev_err(dev,
215-
"%s: ERROR: failed mapping tse control port\n",
216-
__func__);
206+
if (IS_ERR(dwmac->pcs.tse_pcs_base))
217207
return PTR_ERR(dwmac->pcs.tse_pcs_base);
218-
}
219208
}
220209
}
221210
dwmac->reg_offset = reg_offset;

0 commit comments

Comments
 (0)