net: mscc: ocelot: remove redundant dev_err call in vsc9959_mdio_bus_alloc()
authorGuobin Huang <huangguobin4@huawei.com>
Mon, 29 Mar 2021 01:54:05 +0000 (09:54 +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/dsa/ocelot/felix_vsc9959.c

index 5ff623ee76a63e98145a01fe4c3e0671ce314816..789fe08cae50cc875266bba76a7d5402e87511bf 100644 (file)
@@ -1057,10 +1057,8 @@ static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot)
        res.end += felix->imdio_base;
 
        imdio_regs = devm_ioremap_resource(dev, &res);
-       if (IS_ERR(imdio_regs)) {
-               dev_err(dev, "failed to map internal MDIO registers\n");
+       if (IS_ERR(imdio_regs))
                return PTR_ERR(imdio_regs);
-       }
 
        hw = enetc_hw_alloc(dev, imdio_regs);
        if (IS_ERR(hw)) {