From: Jingoo Han Date: Wed, 4 May 2011 23:46:07 +0000 (+0900) Subject: USB: ohci-s3c2410: return proper error if clk_get fails X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=69248d4281fda03dd4da982e1d51f6b22cf1a109;p=openwrt%2Fstaging%2Fblogic.git USB: ohci-s3c2410: return proper error if clk_get fails Return PTR_ERR(clk) instead of -ENOENT if clk_get fails Signed-off-by: Jingoo Han Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c index e6e8d98b385b..7c9a4d55526b 100644 --- a/drivers/usb/host/ohci-s3c2410.c +++ b/drivers/usb/host/ohci-s3c2410.c @@ -362,14 +362,14 @@ static int usb_hcd_s3c2410_probe(const struct hc_driver *driver, clk = clk_get(&dev->dev, "usb-host"); if (IS_ERR(clk)) { dev_err(&dev->dev, "cannot get usb-host clock\n"); - retval = -ENOENT; + retval = PTR_ERR(clk); goto err_mem; } usb_clk = clk_get(&dev->dev, "usb-bus-host"); if (IS_ERR(usb_clk)) { dev_err(&dev->dev, "cannot get usb-bus-host clock\n"); - retval = -ENOENT; + retval = PTR_ERR(usb_clk); goto err_clk; }