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

Commit 6bc12953 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Greg Kroah-Hartman
Browse files

usb/s3c-hsudc: fix error path



I doubt the clock is optional. In case it is it should not return with
an error code because we leak everything.

Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a6207b17
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -1302,7 +1302,8 @@ static int s3c_hsudc_probe(struct platform_device *pdev)
	hsudc->uclk = clk_get(&pdev->dev, "usb-device");
	hsudc->uclk = clk_get(&pdev->dev, "usb-device");
	if (IS_ERR(hsudc->uclk)) {
	if (IS_ERR(hsudc->uclk)) {
		dev_err(dev, "failed to find usb-device clock source\n");
		dev_err(dev, "failed to find usb-device clock source\n");
		return PTR_ERR(hsudc->uclk);
		ret = PTR_ERR(hsudc->uclk);
		goto err_clk;
	}
	}
	clk_enable(hsudc->uclk);
	clk_enable(hsudc->uclk);


@@ -1311,7 +1312,8 @@ static int s3c_hsudc_probe(struct platform_device *pdev)
	disable_irq(hsudc->irq);
	disable_irq(hsudc->irq);
	local_irq_enable();
	local_irq_enable();
	return 0;
	return 0;

err_clk:
	free_irq(hsudc->irq, hsudc);
err_irq:
err_irq:
	iounmap(hsudc->regs);
	iounmap(hsudc->regs);