Skip to content

Commit

Permalink
USB: ohci-s3c2410: return proper error if clk_get fails
Browse files Browse the repository at this point in the history
Return PTR_ERR(clk) instead of -ENOENT 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 7, 2011
1 parent 7af85a8 commit 69248d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/host/ohci-s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 69248d4

Please sign in to comment.