usb: musb: fix PM reference leak in musb_irq_work()
[ Upstream commit 9535b99533 ]
pm_runtime_get_sync will increment pm usage counter even it failed.
thus a pairing decrement is needed.
Fix it by replacing it with pm_runtime_resume_and_get to keep usage
counter balanced.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
Link: https://lore.kernel.org/r/20210408091836.55227-1-cuibixuan@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
015f3f2521
commit
e82da9b21f
1 changed files with 1 additions and 1 deletions
|
|
@ -2070,7 +2070,7 @@ static void musb_irq_work(struct work_struct *data)
|
|||
struct musb *musb = container_of(data, struct musb, irq_work.work);
|
||||
int error;
|
||||
|
||||
error = pm_runtime_get_sync(musb->controller);
|
||||
error = pm_runtime_resume_and_get(musb->controller);
|
||||
if (error < 0) {
|
||||
dev_err(musb->controller, "Could not enable: %i\n", error);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue