diff options
author | Gregory CLEMENT <gregory.clement@bootlin.com> | 2018-04-20 09:52:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-20 10:24:20 -0400 |
commit | 2d79609bf21eedb2142f9dff7d4af9919cd7399a (patch) | |
tree | 14d206ccc3493ca505218a3521ae88c40621dabe | |
parent | 621faf4f6a181b6e012c1d1865213f36f4159b7f (diff) |
usb: host: xhci-plat: Remove useless test before clk_disable_unprepare
clk_disable_unprepare() already checks that the clock pointer is valid.
No need to test it before calling it.
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/host/xhci-plat.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index df327dcc2bac..f0231fea524e 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c | |||
@@ -320,8 +320,7 @@ put_usb3_hcd: | |||
320 | usb_put_hcd(xhci->shared_hcd); | 320 | usb_put_hcd(xhci->shared_hcd); |
321 | 321 | ||
322 | disable_clk: | 322 | disable_clk: |
323 | if (!IS_ERR(clk)) | 323 | clk_disable_unprepare(clk); |
324 | clk_disable_unprepare(clk); | ||
325 | 324 | ||
326 | put_hcd: | 325 | put_hcd: |
327 | usb_put_hcd(hcd); | 326 | usb_put_hcd(hcd); |
@@ -347,8 +346,7 @@ static int xhci_plat_remove(struct platform_device *dev) | |||
347 | usb_remove_hcd(hcd); | 346 | usb_remove_hcd(hcd); |
348 | usb_put_hcd(xhci->shared_hcd); | 347 | usb_put_hcd(xhci->shared_hcd); |
349 | 348 | ||
350 | if (!IS_ERR(clk)) | 349 | clk_disable_unprepare(clk); |
351 | clk_disable_unprepare(clk); | ||
352 | usb_put_hcd(hcd); | 350 | usb_put_hcd(hcd); |
353 | 351 | ||
354 | pm_runtime_set_suspended(&dev->dev); | 352 | pm_runtime_set_suspended(&dev->dev); |