projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ff0ecc
)
usb: host: fotg210: add missed clk_put calls
author
Chuhong Yuan
<hslester96@gmail.com>
Sat, 2 Nov 2019 06:22:45 +0000
(14:22 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 4 Nov 2019 14:53:02 +0000
(15:53 +0100)
The driver forgets to call clk_put when probe fails and remove.
Add the calls to fix it.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Link:
https://lore.kernel.org/r/20191102062245.4014-1-hslester96@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/fotg210-hcd.c
patch
|
blob
|
history
diff --git
a/drivers/usb/host/fotg210-hcd.c
b/drivers/usb/host/fotg210-hcd.c
index
9e0c98d
..
f967adf
100644
(file)
--- a/
drivers/usb/host/fotg210-hcd.c
+++ b/
drivers/usb/host/fotg210-hcd.c
@@
-5646,8
+5646,10
@@
static int fotg210_hcd_probe(struct platform_device *pdev)
return retval;
failed_dis_clk:
- if (!IS_ERR(fotg210->pclk))
+ if (!IS_ERR(fotg210->pclk))
{
clk_disable_unprepare(fotg210->pclk);
+ clk_put(fotg210->pclk);
+ }
failed_put_hcd:
usb_put_hcd(hcd);
fail_create_hcd:
@@
-5665,8
+5667,10
@@
static int fotg210_hcd_remove(struct platform_device *pdev)
struct usb_hcd *hcd = platform_get_drvdata(pdev);
struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd);
- if (!IS_ERR(fotg210->pclk))
+ if (!IS_ERR(fotg210->pclk))
{
clk_disable_unprepare(fotg210->pclk);
+ clk_put(fotg210->pclk);
+ }
usb_remove_hcd(hcd);
usb_put_hcd(hcd);