mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 22:20:50 +07:00
usb: dwc3: pci: Fix reference count leak in dwc3_pci_resume_work
dwc3_pci_resume_work() calls pm_runtime_get_sync() that increments the reference counter. In case of failure, decrement the reference before returning. Signed-off-by: Aditya Pakki <pakki001@umn.edu> Signed-off-by: Felipe Balbi <balbi@kernel.org>
This commit is contained in:
parent
2587a029fa
commit
2655971ad4
@ -206,8 +206,10 @@ static void dwc3_pci_resume_work(struct work_struct *work)
|
||||
int ret;
|
||||
|
||||
ret = pm_runtime_get_sync(&dwc3->dev);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
pm_runtime_put_sync_autosuspend(&dwc3->dev);
|
||||
return;
|
||||
}
|
||||
|
||||
pm_runtime_mark_last_busy(&dwc3->dev);
|
||||
pm_runtime_put_sync_autosuspend(&dwc3->dev);
|
||||
|
Loading…
Reference in New Issue
Block a user