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

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

Merge "msm: vidc: Do not enable power if close is called during SYS_ERROR handling"

parents fc174a12 b57c8ca2
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -4644,9 +4644,10 @@ void msm_comm_smem_free(struct msm_vidc_inst *inst, struct msm_smem *mem)
		return;
	}
	mutex_lock(&inst->core->lock);
	if (inst->state != MSM_VIDC_CORE_INVALID) {
		if (power_on_for_smem(inst))
			goto err_power_on;

	}
	msm_smem_free(inst->mem_client, mem);
err_power_on:
	mutex_unlock(&inst->core->lock);
@@ -4672,6 +4673,13 @@ struct msm_smem *msm_comm_smem_user_to_kernel(struct msm_vidc_inst *inst,
		dprintk(VIDC_ERR, "%s: invalid inst: %p\n", __func__, inst);
		return NULL;
	}

	if (inst->state == MSM_VIDC_CORE_INVALID) {
		dprintk(VIDC_ERR, "Core in Invalid state, returning from %s\n",
			__func__);
		return NULL;
	}

	mutex_lock(&inst->core->lock);
	if (power_on_for_smem(inst))
		goto err_power_on;