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>
This commit is contained in:
Jingoo Han 2011-05-13 21:26:23 +09:00 committed by Greg Kroah-Hartman
parent 66e5c64348
commit 2328ceaea4
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}