Commit 12b7b5c0 authored by Qinglang Miao's avatar Qinglang Miao Committed by Krzysztof Kozlowski

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: default avatarQinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
parent 9123e3a7
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment