提交 004c127e 编写于 作者: J Jingoo Han 提交者: Greg Kroah-Hartman

USB: s3c-hsudc: use IS_ERR() instead of NULL check

clk_get() returns ERR_PTR() on error, not NULL.
Signed-off-by: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 a0885924
......@@ -1299,9 +1299,9 @@ static int s3c_hsudc_probe(struct platform_device *pdev)
s3c_hsudc_setup_ep(hsudc);
hsudc->uclk = clk_get(&pdev->dev, "usb-device");
if (hsudc->uclk == NULL) {
if (IS_ERR(hsudc->uclk)) {
dev_err(dev, "failed to find usb-device clock source\n");
return -ENOENT;
return PTR_ERR(hsudc->uclk);
}
clk_enable(hsudc->uclk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册