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

Commit 7e9bdc0c 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: Release device lock while returning error from pm handler"

parents 9b418489 960a45b8
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -3314,14 +3314,14 @@ static void venus_hfi_pm_handler(struct work_struct *work)
	if (!device->power_enabled) {
		dprintk(VIDC_DBG, "%s: Power already disabled\n",
				__func__);
		return;
		goto exit;
	}

	rc = __core_in_valid_state(device);
	if (!rc) {
		dprintk(VIDC_WARN,
			"Core is in bad state, Skipping power collapse\n");
		return;
		goto skip_power_off;
	}

	dprintk(VIDC_DBG, "Prepare for power collapse\n");
@@ -3340,6 +3340,11 @@ static void venus_hfi_pm_handler(struct work_struct *work)
		dprintk(VIDC_ERR, "Failed to prepare for PC %d\n", rc);
		__alloc_set_imem(device);
		mutex_unlock(&device->lock);
		/*
		 * __process_fatal_error invokes msm_vidc layer callback
		 * function. Hence avoid holding the device->lock over the
		 * callback function.
		 */
		__process_fatal_error(device);
		return;
	}
@@ -3393,6 +3398,7 @@ skip_power_off:

	__alloc_set_imem(device);
err_unset_imem:
exit:
	mutex_unlock(&device->lock);
	return;
}