ARM: s3c64xx: fix return value check in s3c_usb_otgphy_init()
authorQinglang Miao <miaoqinglang@huawei.com>
Tue, 28 Jul 2020 02:27:56 +0000 (10:27 +0800)
committerKrzysztof Kozlowski <krzk@kernel.org>
Mon, 17 Aug 2020 15:43:53 +0000 (17:43 +0200)
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>
arch/arm/mach-s3c64xx/setup-usb-phy.c

index d6b0e3b268afe3e791573613b2817d5a3665028b..99d74388456a00572fbb5213512fc38de44a08a0 100644 (file)
@@ -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;