Skip to content

Commit 2d79609

Browse files
gclementgregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 621faf4 commit 2d79609

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/usb/host/xhci-plat.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
320320
usb_put_hcd(xhci->shared_hcd);
321321

322322
disable_clk:
323-
if (!IS_ERR(clk))
324-
clk_disable_unprepare(clk);
323+
clk_disable_unprepare(clk);
325324

326325
put_hcd:
327326
usb_put_hcd(hcd);
@@ -347,8 +346,7 @@ static int xhci_plat_remove(struct platform_device *dev)
347346
usb_remove_hcd(hcd);
348347
usb_put_hcd(xhci->shared_hcd);
349348

350-
if (!IS_ERR(clk))
351-
clk_disable_unprepare(clk);
349+
clk_disable_unprepare(clk);
352350
usb_put_hcd(hcd);
353351

354352
pm_runtime_set_suspended(&dev->dev);

0 commit comments

Comments
 (0)