[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1471964943-742-1-git-send-email-weiyj.lk@gmail.com>
Date: Tue, 23 Aug 2016 15:09:03 +0000
From: Wei Yongjun <weiyj.lk@...il.com>
To: "David S . Miller" <davem@...emloft.net>,
Florian Fainelli <f.fainelli@...il.com>,
Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
Andrew Lunn <andrew@...n.ch>, Jiri Pirko <jiri@...lanox.com>
Cc: Wei Yongjun <weiyongjun1@...wei.com>, netdev@...r.kernel.org
Subject: [PATCH -next] net: dsa: bcm_sf2: Remove redundant dev_err call in bcm_sf2_sw_probe()
From: Wei Yongjun <weiyongjun1@...wei.com>
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 <weiyongjun1@...wei.com>
---
drivers/net/dsa/bcm_sf2.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index 8e6fe13..3952302 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -1643,10 +1643,8 @@ static int bcm_sf2_sw_probe(struct platform_device *pdev)
for (i = 0; i < BCM_SF2_REGS_NUM; i++) {
r = platform_get_resource(pdev, IORESOURCE_MEM, i);
*base = devm_ioremap_resource(&pdev->dev, r);
- if (IS_ERR(*base)) {
- pr_err("unable to find register: %s\n", reg_names[i]);
+ if (IS_ERR(*base))
return PTR_ERR(*base);
- }
base++;
}
Powered by blists - more mailing lists