]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
usb: host: xhci-plat: Remove useless test before clk_disable_unprepare
authorGregory CLEMENT <gregory.clement@bootlin.com>
Fri, 20 Apr 2018 13:52:51 +0000 (16:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Apr 2018 14:24:20 +0000 (16:24 +0200)
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>
drivers/usb/host/xhci-plat.c

index df327dcc2bac3b934399360ed32b504c7fbeabc1..f0231fea524e0d7c613113f411b235f59147932b 100644 (file)
@@ -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);