USB: s3c-hsudc: use IS_ERR() instead of NULL check
authorJingoo Han <jg1.han@samsung.com>
Fri, 13 May 2011 12:27:24 +0000 (21:27 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 May 2011 22:51:06 +0000 (15:51 -0700)
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>
drivers/usb/gadget/s3c-hsudc.c

index d26901932a5c3070147acd81e2f06fa798575251..c339e171eacbd833104c910c01ba793e26fa7e65 100644 (file)
@@ -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);