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

Commit 6270fc3c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: handle kgsl_mmu_getpagetable() errors"

parents 1b0544a7 d6bd95f0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -915,12 +915,14 @@ static struct kgsl_process_private *kgsl_process_private_new(
	/* Allocate a pagetable for the new process object */
	if (kgsl_mmu_enabled()) {
		private->pagetable = kgsl_mmu_getpagetable(&device->mmu, tgid);
		if (private->pagetable == NULL) {
		if (IS_ERR(private->pagetable)) {
			int err = PTR_ERR(private->pagetable);

			idr_destroy(&private->mem_idr);
			idr_destroy(&private->syncsource_idr);

			kfree(private);
			private = ERR_PTR(-ENOMEM);
			private = ERR_PTR(err);
		}
	}

+2 −2
Original line number Diff line number Diff line
@@ -1685,7 +1685,7 @@ static int arm_smmu_attach_dynamic(struct iommu_domain *domain,
	int ret;
	struct arm_smmu_domain *smmu_domain = domain->priv;
	enum io_pgtable_fmt fmt;
	struct io_pgtable_ops *pgtbl_ops;
	struct io_pgtable_ops *pgtbl_ops = NULL;
	struct arm_smmu_cfg *cfg = &smmu_domain->cfg;

	if (!(smmu->options & ARM_SMMU_OPT_DYNAMIC)) {
@@ -1752,7 +1752,7 @@ static int arm_smmu_attach_dynamic(struct iommu_domain *domain,
	ret = 0;
out:
	if (ret)
		kfree(pgtbl_ops);
		free_io_pgtable_ops(pgtbl_ops);
	mutex_unlock(&smmu->attach_lock);

	return ret;