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

Commit 9c78c4c3 authored by Wei Yongjun's avatar Wei Yongjun Committed by Thierry Reding
Browse files

gpu: host1x: Disable clock on probe failure



Add a missing clk_disable_unprepare() before returning from the driver's
.probe() function on error.

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: default avatarTerje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent db7fbdfd
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ static int host1x_probe(struct platform_device *pdev)
	err = host1x_syncpt_init(host);
	if (err) {
		dev_err(&pdev->dev, "failed to initialize syncpts\n");
		return err;
		goto fail_unprepare_disable;
	}

	err = host1x_intr_init(host, syncpt_irq);
@@ -175,6 +175,8 @@ fail_deinit_intr:
	host1x_intr_deinit(host);
fail_deinit_syncpt:
	host1x_syncpt_deinit(host);
fail_unprepare_disable:
	clk_disable_unprepare(host->clk);
	return err;
}