summaryrefslogtreecommitdiff
path: root/arch/arm/mach-s3c64xx/setup-usb-phy.c
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-07-28 10:27:56 +0800
committerKrzysztof Kozlowski <krzk@kernel.org>2020-08-17 17:43:53 +0200
commit12b7b5c04bccc82db74f7c0de8e2d2b93d27cebf (patch)
tree733691aa9e4330b59aab8947f1017b1f57ee9959 /arch/arm/mach-s3c64xx/setup-usb-phy.c
parent9123e3a74ec7b934a4a099e98af6a61c2f80bbf5 (diff)
ARM: s3c64xx: 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@huawei.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Diffstat (limited to 'arch/arm/mach-s3c64xx/setup-usb-phy.c')
-rw-r--r--arch/arm/mach-s3c64xx/setup-usb-phy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c64xx/setup-usb-phy.c b/arch/arm/mach-s3c64xx/setup-usb-phy.c
index d6b0e3b268af..99d74388456a 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;