[PATCH] usb: phy: tahvo: Check before clk_disable() not needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



clk_disable() already checks the clk ptr using IS_ERR_OR_NULL(clk)
so there is no need to check it again before calling it.

Signed-off-by: Yihao Han <hanyihao@xxxxxxxx>
---
 drivers/usb/phy/phy-tahvo.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/phy/phy-tahvo.c b/drivers/usb/phy/phy-tahvo.c
index f2d2cc586c5b..9cecc5444515 100644
--- a/drivers/usb/phy/phy-tahvo.c
+++ b/drivers/usb/phy/phy-tahvo.c
@@ -406,8 +406,7 @@ static int tahvo_usb_probe(struct platform_device *pdev)
 err_remove_phy:
 	usb_remove_phy(&tu->phy);
 err_disable_clk:
-	if (!IS_ERR(tu->ick))
-		clk_disable(tu->ick);
+	clk_disable(tu->ick);
 
 	return ret;
 }
@@ -418,8 +417,7 @@ static int tahvo_usb_remove(struct platform_device *pdev)
 
 	free_irq(tu->irq, tu);
 	usb_remove_phy(&tu->phy);
-	if (!IS_ERR(tu->ick))
-		clk_disable(tu->ick);
+	clk_disable(tu->ick);
 
 	return 0;
 }
-- 
2.17.1




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux