[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200728022756.87687-1-miaoqinglang@huawei.com>
Date: Tue, 28 Jul 2020 10:27:56 +0800
From: Qinglang Miao <miaoqinglang@...wei.com>
To: Kukjin Kim <kgene@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>
CC: Russell King <linux@...linux.org.uk>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-samsung-soc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] ARM: s3c: fix return value check in s3c_usb_otgphy_init()
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@...wei.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
Powered by blists - more mailing lists