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

Commit 4ab7b7ce authored by Laura Abbott's avatar Laura Abbott
Browse files

iommu: msm: Only remove bus vote on error



The bus vote client should only be removed on error and not
unconditionally. Change the code flow accordingly.

Change-Id: I28044f0f5ede2b66719e0d9f8d60dd0afa325bf9
Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
parent 5c3bdb89
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -208,10 +208,14 @@ static int msm_iommu_parse_dt(struct platform_device *pdev,
	ret = of_platform_populate(pdev->dev.of_node,
				   msm_iommu_v1_ctx_match_table,
				   NULL, &pdev->dev);
	if (ret)
	if (ret) {
		pr_err("Failed to create iommu context device\n");
		goto fail;
	}

	msm_iommu_add_drv(drvdata);
	return 0;

fail:
	__put_bus_vote_client(drvdata);
	return ret;