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

Commit 5f817153 authored by Shrenuj Bansal's avatar Shrenuj Bansal
Browse files

msm: kgsl: Correct memdesc conditions in cma_coherent_free



The condition in question simply OR'd memdesc->priv and hence
always evaluated to be true. Change the conditional operator to &
to fix this since it would break NOMMU mode. Also fix the condition
one level below.

Change-Id: Id02404cea01174a1be276fe164f757103a25ed49
Signed-off-by: default avatarShrenuj Bansal <shrenujb@codeaurora.org>
parent 957c188a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -486,9 +486,9 @@ static int kgsl_contiguous_vmfault(struct kgsl_memdesc *memdesc,
static void kgsl_cma_coherent_free(struct kgsl_memdesc *memdesc)
{
	if (memdesc->hostptr) {
		if (memdesc->priv | KGSL_MEMDESC_SECURE) {
		if (memdesc->priv & KGSL_MEMDESC_SECURE) {
			kgsl_driver.stats.secure -= memdesc->size;
			if (memdesc->priv | KGSL_MEMDESC_TZ_LOCKED)
			if (memdesc->priv & KGSL_MEMDESC_TZ_LOCKED)
				kgsl_cma_unlock_secure(
				memdesc->pagetable->mmu->device, memdesc);
		} else