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 8982c882af1b567a6a34ee6db6641ecbb6f332a4..a0d1b084ecec9820aead869a281289a2d4249d9c 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");
-               ret = -ENODEV;
-               goto out_mdio;
+               return -ENODEV;
        }
 
        init_waitqueue_head(&dev->smi_busy_wait);