Commit 69248d42 authored by Jingoo Han's avatar Jingoo Han Committed by Greg Kroah-Hartman

USB: ohci-s3c2410: return proper error if clk_get fails

Return PTR_ERR(clk) instead of -ENOENT if clk_get fails
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7af85a85
...@@ -362,14 +362,14 @@ static int usb_hcd_s3c2410_probe(const struct hc_driver *driver, ...@@ -362,14 +362,14 @@ static int usb_hcd_s3c2410_probe(const struct hc_driver *driver,
clk = clk_get(&dev->dev, "usb-host"); clk = clk_get(&dev->dev, "usb-host");
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
dev_err(&dev->dev, "cannot get usb-host clock\n"); dev_err(&dev->dev, "cannot get usb-host clock\n");
retval = -ENOENT; retval = PTR_ERR(clk);
goto err_mem; goto err_mem;
} }
usb_clk = clk_get(&dev->dev, "usb-bus-host"); usb_clk = clk_get(&dev->dev, "usb-bus-host");
if (IS_ERR(usb_clk)) { if (IS_ERR(usb_clk)) {
dev_err(&dev->dev, "cannot get usb-bus-host clock\n"); dev_err(&dev->dev, "cannot get usb-bus-host clock\n");
retval = -ENOENT; retval = PTR_ERR(usb_clk);
goto err_clk; goto err_clk;
} }
......
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