summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/s3c-hsudc.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2011-05-13 14:27:24 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-14 00:51:06 +0200
commit004c127ef071e33df99708c2778fdb15564962ce (patch)
tree2e1039b0f5c02e98d76cdad887017f58d26096d0 /drivers/usb/gadget/s3c-hsudc.c
parentxhci: move the common code to a function to get max ports and port array (diff)
downloadlinux-004c127ef071e33df99708c2778fdb15564962ce.tar.xz
linux-004c127ef071e33df99708c2778fdb15564962ce.zip
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/s3c-hsudc.c')
-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 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)
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);