Commit 2d79609b authored by Gregory CLEMENT's avatar Gregory CLEMENT Committed by Greg Kroah-Hartman

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: default avatarGregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 621faf4f
...@@ -320,8 +320,7 @@ static int xhci_plat_probe(struct platform_device *pdev) ...@@ -320,8 +320,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
usb_put_hcd(xhci->shared_hcd); usb_put_hcd(xhci->shared_hcd);
disable_clk: disable_clk:
if (!IS_ERR(clk)) clk_disable_unprepare(clk);
clk_disable_unprepare(clk);
put_hcd: put_hcd:
usb_put_hcd(hcd); usb_put_hcd(hcd);
...@@ -347,8 +346,7 @@ static int xhci_plat_remove(struct platform_device *dev) ...@@ -347,8 +346,7 @@ static int xhci_plat_remove(struct platform_device *dev)
usb_remove_hcd(hcd); usb_remove_hcd(hcd);
usb_put_hcd(xhci->shared_hcd); usb_put_hcd(xhci->shared_hcd);
if (!IS_ERR(clk)) clk_disable_unprepare(clk);
clk_disable_unprepare(clk);
usb_put_hcd(hcd); usb_put_hcd(hcd);
pm_runtime_set_suspended(&dev->dev); pm_runtime_set_suspended(&dev->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment