diff options
author | Jingoo Han <jg1.han@samsung.com> | 2011-05-13 08:27:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-13 18:51:06 -0400 |
commit | 004c127ef071e33df99708c2778fdb15564962ce (patch) | |
tree | 2e1039b0f5c02e98d76cdad887017f58d26096d0 /drivers/usb/gadget | |
parent | a0885924326f79e157847010a9aaf49b058b30dc (diff) |
USB: s3c-hsudc: use IS_ERR() instead of NULL check
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>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/s3c-hsudc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c index d26901932a5c..c339e171eacb 100644 --- a/drivers/usb/gadget/s3c-hsudc.c +++ b/drivers/usb/gadget/s3c-hsudc.c | |||
@@ -1299,9 +1299,9 @@ static int s3c_hsudc_probe(struct platform_device *pdev) | |||
1299 | s3c_hsudc_setup_ep(hsudc); | 1299 | s3c_hsudc_setup_ep(hsudc); |
1300 | 1300 | ||
1301 | hsudc->uclk = clk_get(&pdev->dev, "usb-device"); | 1301 | hsudc->uclk = clk_get(&pdev->dev, "usb-device"); |
1302 | if (hsudc->uclk == NULL) { | 1302 | if (IS_ERR(hsudc->uclk)) { |
1303 | dev_err(dev, "failed to find usb-device clock source\n"); | 1303 | dev_err(dev, "failed to find usb-device clock source\n"); |
1304 | return -ENOENT; | 1304 | return PTR_ERR(hsudc->uclk); |
1305 | } | 1305 | } |
1306 | clk_enable(hsudc->uclk); | 1306 | clk_enable(hsudc->uclk); |
1307 | 1307 | ||