summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2011-05-13 21:26:23 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-13 15:51:07 -0700
commit2328ceaea4fb917f8b861b18151b2245233b083f (patch)
tree2ec66a92c54d2d16a2a402afeb0f788b4502a46b
parent66e5c643488a26d2a6b737bdbd92fc72f13cdeac (diff)
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index 1d332f5da3c..acb9cc418df 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;
}