aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorGregory CLEMENT <gregory.clement@bootlin.com>2018-04-20 16:52:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-20 16:24:20 +0200
commit2d79609bf21eedb2142f9dff7d4af9919cd7399a (patch)
tree14d206ccc3493ca505218a3521ae88c40621dabe /drivers/usb
parentxhci: Fix USB ports for Dell Inspiron 5775 (diff)
downloadlinux-dev-2d79609bf21eedb2142f9dff7d4af9919cd7399a.tar.xz
linux-dev-2d79609bf21eedb2142f9dff7d4af9919cd7399a.zip
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/xhci-plat.c6
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:
usb_put_hcd(xhci->shared_hcd);
disable_clk:
- if (!IS_ERR(clk))
- clk_disable_unprepare(clk);
+ clk_disable_unprepare(clk);
put_hcd:
usb_put_hcd(hcd);
@@ -347,8 +346,7 @@ static int xhci_plat_remove(struct platform_device *dev)
usb_remove_hcd(hcd);
usb_put_hcd(xhci->shared_hcd);
- if (!IS_ERR(clk))
- clk_disable_unprepare(clk);
+ clk_disable_unprepare(clk);
usb_put_hcd(hcd);
pm_runtime_set_suspended(&dev->dev);