Skip to content

Commit

Permalink
USB: s3c-hsudc: use IS_ERR() instead of NULL check
Browse files Browse the repository at this point in the history
clk_get() returns ERR_PTR() on error, not NULL.

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 a088592 commit 004c127
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/gadget/s3c-hsudc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1299,9 +1299,9 @@ static int s3c_hsudc_probe(struct platform_device *pdev)
s3c_hsudc_setup_ep(hsudc);

hsudc->uclk = clk_get(&pdev->dev, "usb-device");
if (hsudc->uclk == NULL) {
if (IS_ERR(hsudc->uclk)) {
dev_err(dev, "failed to find usb-device clock source\n");
return -ENOENT;
return PTR_ERR(hsudc->uclk);
}
clk_enable(hsudc->uclk);

Expand Down

0 comments on commit 004c127

Please sign in to comment.