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

Commit 77ee218f 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: Check for MMU presence before destroy"

parents 1a59c350 17729045
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -832,7 +832,8 @@ static void kgsl_destroy_process_private(struct kref *kref)
	idr_destroy(&private->syncsource_idr);

	/* When using global pagetables, do not detach global pagetable */
	if (private->pagetable->name != KGSL_MMU_GLOBAL_PT)
	if (kgsl_mmu_enabled() &&
		 private->pagetable->name != KGSL_MMU_GLOBAL_PT)
		kgsl_mmu_putpagetable(private->pagetable);

	kfree(private);
@@ -983,7 +984,8 @@ static void kgsl_process_private_close(struct kgsl_device_private *dev_priv,
	process_release_sync_sources(private);

	/* When using global pagetables, do not detach global pagetable */
	if (private->pagetable->name != KGSL_MMU_GLOBAL_PT)
	if (kgsl_mmu_enabled() &&
		private->pagetable->name != KGSL_MMU_GLOBAL_PT)
		kgsl_mmu_detach_pagetable(private->pagetable);

	/* Remove the process struct from the master list */