479094830e591677ba86dc7787dca0913222b363
[openwrt/staging/blocktrron.git] /
1 From ce3a380dddd0cb16cb3d8d947b69657d7646c121 Mon Sep 17 00:00:00 2001
2 From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
3 Date: Wed, 13 Jul 2016 12:46:57 +0000
4 Subject: [PATCH] net: ethernet: bgmac: Remove redundant dev_err call in
5 bgmac_probe()
6
7 There is a error message within devm_ioremap_resource
8 already, so remove the dev_err call to avoid redundant
9 error message.
10
11 Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
12 Signed-off-by: David S. Miller <davem@davemloft.net>
13 ---
14 drivers/net/ethernet/broadcom/bgmac-platform.c | 8 ++------
15 1 file changed, 2 insertions(+), 6 deletions(-)
16
17 --- a/drivers/net/ethernet/broadcom/bgmac-platform.c
18 +++ b/drivers/net/ethernet/broadcom/bgmac-platform.c
19 @@ -129,10 +129,8 @@ static int bgmac_probe(struct platform_d
20 }
21
22 bgmac->plat.base = devm_ioremap_resource(&pdev->dev, regs);
23 - if (IS_ERR(bgmac->plat.base)) {
24 - dev_err(&pdev->dev, "Unable to map base resource\n");
25 + if (IS_ERR(bgmac->plat.base))
26 return PTR_ERR(bgmac->plat.base);
27 - }
28
29 regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "idm_base");
30 if (!regs) {
31 @@ -141,10 +139,8 @@ static int bgmac_probe(struct platform_d
32 }
33
34 bgmac->plat.idm_base = devm_ioremap_resource(&pdev->dev, regs);
35 - if (IS_ERR(bgmac->plat.idm_base)) {
36 - dev_err(&pdev->dev, "Unable to map idm resource\n");
37 + if (IS_ERR(bgmac->plat.idm_base))
38 return PTR_ERR(bgmac->plat.idm_base);
39 - }
40
41 bgmac->read = platform_bgmac_read;
42 bgmac->write = platform_bgmac_write;