diff options
author | Jingoo Han <jg1.han@samsung.com> | 2011-05-13 16:26:23 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-14 02:51:07 +0400 |
commit | 2328ceaea4fb917f8b861b18151b2245233b083f (patch) | |
tree | 2ec66a92c54d2d16a2a402afeb0f788b4502a46b | |
parent | 66e5c643488a26d2a6b737bdbd92fc72f13cdeac (diff) | |
download | linux-2328ceaea4fb917f8b861b18151b2245233b083f.tar.xz |
USB: s3c-hsotg: return proper error if clk_get fails
Return PTR_ERR(hsotg->clk) instead of -EINVAL if clk_get fails
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/gadget/s3c-hsotg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 1d332f5da3c8..acb9cc418df9 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -3318,7 +3318,7 @@ static int __devinit s3c_hsotg_probe(struct platform_device *pdev) hsotg->clk = clk_get(&pdev->dev, "otg"); if (IS_ERR(hsotg->clk)) { dev_err(dev, "cannot get otg clock\n"); - ret = -EINVAL; + ret = PTR_ERR(hsotg->clk); goto err_mem; } |