summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2011-05-13 21:27:24 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-13 15:51:06 -0700
commit004c127ef071e33df99708c2778fdb15564962ce (patch)
tree2e1039b0f5c02e98d76cdad887017f58d26096d0 /drivers/usb/gadget
parenta0885924326f79e157847010a9aaf49b058b30dc (diff)
downloadop-kernel-dev-004c127ef071e33df99708c2778fdb15564962ce.zip
op-kernel-dev-004c127ef071e33df99708c2778fdb15564962ce.tar.gz
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c
index d269019..c339e17 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)
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);
OpenPOWER on IntegriCloud