OSDN Git Service

net: mdio: Remove redundant dev_err call in mdio_mux_iproc_probe()
authorGuobin Huang <huangguobin4@huawei.com>
Mon, 29 Mar 2021 01:38:32 +0000 (09:38 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Mar 2021 20:16:44 +0000 (13:16 -0700)
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Guobin Huang <huangguobin4@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mdio/mdio-mux-bcm-iproc.c

index 641cfa4..03261e6 100644 (file)
@@ -197,10 +197,8 @@ static int mdio_mux_iproc_probe(struct platform_device *pdev)
                res->end = res->start + MDIO_REG_ADDR_SPACE_SIZE - 1;
        }
        md->base = devm_ioremap_resource(&pdev->dev, res);
-       if (IS_ERR(md->base)) {
-               dev_err(&pdev->dev, "failed to ioremap register\n");
+       if (IS_ERR(md->base))
                return PTR_ERR(md->base);
-       }
 
        md->mii_bus = devm_mdiobus_alloc(&pdev->dev);
        if (!md->mii_bus) {