> @@ -335,6 +338,10 @@ static int macb_mdio_read(struct mii_bus *bus, int
> mii_id, int regnum)
> int value;
> int err;
>
> + err = pm_runtime_get_sync(&bp->pdev->dev);
> + if (err < 0)
> + return err;
> +
> err = macb_mdio_wait_for_idle(bp);
> if (err < 0)
> return err;
Hi Harini
Thanks for adding runtime PM support to the MDIO bus.
It looks like on the error paths you are not always undoing the
pm_runtime_get_sync(). You probably need some sort of goto err;
construct. macb_mdio_write() has the same issue.
Andrew