[<prev] [next>] [day] [month] [year] [list]
Message-ID: <c145121b-3d69-a02a-17f5-f0eb2f166663@web.de>
Date: Sun, 14 Jun 2020 10:56:14 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Navid Emamdoost <navid.emamdoost@...il.com>, netdev@...r.kernel.org
Cc: Navid Emamdoost <emamd001@....edu>, Kangjie Lu <kjlu@....edu>,
Stephen McCamant <smccaman@....edu>,
Qiushi Wu <wu000273@....edu>,
"David S. Miller" <davem@...emloft.net>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: macb: fix ref count leaking via pm_runtime_get_sync
> 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
Powered by blists - more mailing lists