projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6efb943
)
usb: cdns3: Fix runtime PM imbalance on error
author
Dinghao Liu
<dinghao.liu@zju.edu.cn>
Mon, 12 Apr 2021 05:49:07 +0000
(13:49 +0800)
committer
Peter Chen
<peter.chen@kernel.org>
Tue, 11 May 2021 06:15:41 +0000
(14:15 +0800)
When cdns3_gadget_start() fails, a pairing PM usage counter
decrement is needed to keep the counter balanced.
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Link:
https://lore.kernel.org/r/20210412054908.7975-1-dinghao.liu@zju.edu.cn
Signed-off-by: Peter Chen <peter.chen@kernel.org>
drivers/usb/cdns3/cdns3-gadget.c
patch
|
blob
|
history
diff --git
a/drivers/usb/cdns3/cdns3-gadget.c
b/drivers/usb/cdns3/cdns3-gadget.c
index
9b1bd41
..
a8b7b50
100644
(file)
--- a/
drivers/usb/cdns3/cdns3-gadget.c
+++ b/
drivers/usb/cdns3/cdns3-gadget.c
@@
-3268,8
+3268,10
@@
static int __cdns3_gadget_init(struct cdns *cdns)
pm_runtime_get_sync(cdns->dev);
ret = cdns3_gadget_start(cdns);
pm_runtime_get_sync(cdns->dev);
ret = cdns3_gadget_start(cdns);
- if (ret)
+ if (ret) {
+ pm_runtime_put_sync(cdns->dev);
return ret;
return ret;
+ }
/*
* Because interrupt line can be shared with other components in
/*
* Because interrupt line can be shared with other components in