diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c index b8fe359c732..72d7410ae26 100644 --- a/drivers/gpu/msm/adreno.c +++ b/drivers/gpu/msm/adreno.c @@ -879,8 +879,10 @@ static int adreno_iommu_setstate(struct kgsl_device *device, num_iommu_units = kgsl_mmu_get_num_iommu_units(&device->mmu); context = kgsl_context_get(device, context_id); - if (context == NULL) + if (context == NULL) { + kgsl_mmu_device_setstate(&device->mmu, KGSL_CONTEXT_INVALID); return -EINVAL; + } adreno_ctx = ADRENO_CONTEXT(context);