Skip to content

Commit ce3a380

Browse files
Wei Yongjundavem330
authored andcommitted
net: ethernet: bgmac: Remove redundant dev_err call in bgmac_probe()
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 3f30849 commit ce3a380

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/net/ethernet/broadcom/bgmac-platform.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,8 @@ static int bgmac_probe(struct platform_device *pdev)
129129
}
130130

131131
bgmac->plat.base = devm_ioremap_resource(&pdev->dev, regs);
132-
if (IS_ERR(bgmac->plat.base)) {
133-
dev_err(&pdev->dev, "Unable to map base resource\n");
132+
if (IS_ERR(bgmac->plat.base))
134133
return PTR_ERR(bgmac->plat.base);
135-
}
136134

137135
regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "idm_base");
138136
if (!regs) {
@@ -141,10 +139,8 @@ static int bgmac_probe(struct platform_device *pdev)
141139
}
142140

143141
bgmac->plat.idm_base = devm_ioremap_resource(&pdev->dev, regs);
144-
if (IS_ERR(bgmac->plat.idm_base)) {
145-
dev_err(&pdev->dev, "Unable to map idm resource\n");
142+
if (IS_ERR(bgmac->plat.idm_base))
146143
return PTR_ERR(bgmac->plat.idm_base);
147-
}
148144

149145
bgmac->read = platform_bgmac_read;
150146
bgmac->write = platform_bgmac_write;

0 commit comments

Comments
 (0)