* [PATCH] usb: phy: tahvo: Check before clk_disable() not needed
@ 2022-06-10 7:45 Yihao Han
2022-06-10 9:01 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Yihao Han @ 2022-06-10 7:45 UTC (permalink / raw)
To: Felipe Balbi, Greg Kroah-Hartman, linux-usb, linux-kernel; +Cc: Yihao Han
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@vivo.com>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-10 9:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10 7:45 [PATCH] usb: phy: tahvo: Check before clk_disable() not needed Yihao Han
2022-06-10 9:01 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®