Re: [PATCH] net: macb: fix ref count leaking via pm_runtime_get_sync

From: Markus Elfring
Date: Sun Jun 14 2020 - 04:56:32 EST


> in macb_mdio_write, â

* Will a desire evolve to improve also this commit message?

* Will the tag âFixesâ become helpful?


â
> +++ b/drivers/net/ethernet/cadence/macb_main.c
â
> @@ -3840,11 +3842,14 @@ static int at91ether_open(struct net_device *dev)
>
> ret = macb_phylink_connect(lp);
> if (ret)
> - return ret;
> + goto out;
>
> netif_start_queue(dev);
>
> return 0;
> +out:
> + pm_runtime_put(&lp->pdev->dev);
> + return ret;
> }
â

Perhaps use the label âput_runtimeâ instead?

Regards,
Markus