net: mvmdio: do not clk_disable_unprepare() NULL clock
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 30 Sep 2016 21:56:37 +0000 (00:56 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Oct 2016 06:03:27 +0000 (02:03 -0400)
There is no need to clk_disable_unprepare(dev->clk)
before it was initialized.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvmdio.c

index 8982c88..a0d1b08 100644 (file)
@@ -211,8 +211,7 @@ static int orion_mdio_probe(struct platform_device *pdev)
        dev->regs = devm_ioremap(&pdev->dev, r->start, resource_size(r));
        if (!dev->regs) {
                dev_err(&pdev->dev, "Unable to remap SMI register\n");
        dev->regs = devm_ioremap(&pdev->dev, r->start, resource_size(r));
        if (!dev->regs) {
                dev_err(&pdev->dev, "Unable to remap SMI register\n");
-               ret = -ENODEV;
-               goto out_mdio;
+               return -ENODEV;
        }
 
        init_waitqueue_head(&dev->smi_busy_wait);
        }
 
        init_waitqueue_head(&dev->smi_busy_wait);