Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 004c127e authored by Jingoo Han's avatar Jingoo Han Committed by Greg Kroah-Hartman
Browse files

USB: s3c-hsudc: use IS_ERR() instead of NULL check



clk_get() returns ERR_PTR() on error, not NULL.

Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a0885924
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);