linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ARM: s3c: fix return value check in s3c_usb_otgphy_init()
@ 2020-07-28  2:27 Qinglang Miao
  2020-07-28 12:47 ` Krzysztof Kozlowski
  2020-08-17 15:45 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 3+ messages in thread
From: Qinglang Miao @ 2020-07-28  2:27 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Greg Kroah-Hartman
  Cc: linux-samsung-soc, Russell King, linux-arm-kernel, linux-kernel

the function clk_get() returns ERR_PTR() in case of error and
never returns NULL. So there's no need to test whether xusbxti
is NULL, just remove the redundant part in the return value check.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 arch/arm/mach-s3c64xx/setup-usb-phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-s3c64xx/setup-usb-phy.c b/arch/arm/mach-s3c64xx/setup-usb-phy.c
index d6b0e3b26..99d743884 100644
--- a/arch/arm/mach-s3c64xx/setup-usb-phy.c
+++ b/arch/arm/mach-s3c64xx/setup-usb-phy.c
@@ -31,7 +31,7 @@ static int s3c_usb_otgphy_init(struct platform_device *pdev)
 	phyclk = readl(S3C_PHYCLK) & ~S3C_PHYCLK_CLKSEL_MASK;
 
 	xusbxti = clk_get(&pdev->dev, "xusbxti");
-	if (xusbxti && !IS_ERR(xusbxti)) {
+	if (!IS_ERR(xusbxti)) {
 		switch (clk_get_rate(xusbxti)) {
 		case 12 * MHZ:
 			phyclk |= S3C_PHYCLK_CLKSEL_12M;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-17 15:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-28  2:27 [PATCH -next] ARM: s3c: fix return value check in s3c_usb_otgphy_init() Qinglang Miao
2020-07-28 12:47 ` Krzysztof Kozlowski
2020-08-17 15:45 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).