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

Commit ee144bbe authored by Terence Hampson's avatar Terence Hampson
Browse files

mdp3: Prevent deref of invalid pointer that contains err code



It is possible that mdp3_iommu_meta_put with a non null iommu_meta
that contains PTR_ERR value.

Change-Id: I440c78e324f558fec22d2db373dfd2c0e4d5fbb7
Signed-off-by: default avatarTerence Hampson <thampson@codeaurora.org>
parent bfd7e850
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1444,7 +1444,9 @@ int mdp3_self_map_iommu(struct ion_client *client, struct ion_handle *handle,
			ret = 0;
		} else {
			ret = PTR_ERR(iommu_meta);
			goto out_unlock;
			mutex_unlock(&mdp3_res->iommu_lock);
			pr_err("%s: meta_create failed err=%d", __func__, ret);
			return ret;
		}
	} else {
		if (iommu_meta->flags != iommu_flags) {