mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
9123e3a74e
commit
12b7b5c04b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue