Home
last modified time | relevance | path

Searched hist:da875fa5040b0f951cb4bf7efbf59f6dcff44d3c (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/net/ethernet/freescale/
H A Dfec_main.cdiff da875fa5040b0f951cb4bf7efbf59f6dcff44d3c Tue Nov 10 10:29:33 CET 2020 Zhang Qilong <zhangqilong3@huawei.com> net: fec: Fix reference count leak in fec series ops

pm_runtime_get_sync() will increment pm usage at first and it will
resume the device later. If runtime of the device has error or
device is in inaccessible state(or other error state), resume
operation will fail. If we do not call put operation to decrease
the reference, it will result in reference count leak. Moreover,
this device cannot enter the idle state and always stay busy or other
non-idle state later. So we fixed it by replacing it with
pm_runtime_resume_and_get.

Fixes: 8fff755e9f8d0 ("net: fec: Ensure clocks are enabled while using mdio bus")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>