Skip to content

Commit

Permalink
USB: s3c-hsotg: return proper error if clk_get fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jingoo Han authored and Greg Kroah-Hartman committed May 13, 2011
1 parent 66e5c64 commit 2328cea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/s3c-hsotg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2328cea

Please sign in to comment.