Re: [PATCH] net: fec: fix ref count leaking when pm_runtime_get_sync fails

From: David Miller
Date: Mon Jun 15 2020 - 16:42:19 EST


From: Navid Emamdoost <navid.emamdoost@xxxxxxxxx>
Date: Sun, 14 Jun 2020 00:38:01 -0500

> in fec_enet_mdio_read, fec_enet_mdio_write, fec_enet_get_regs,
> fec_enet_open and fec_drv_remove, pm_runtime_get_sync is called which
> increments the counter even in case of failure, leading to incorrect
> ref count. In case of failure, decrement the ref count before returning.
>
> Signed-off-by: Navid Emamdoost <navid.emamdoost@xxxxxxxxx>

This does not apply to the net tree.