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

Commit 7a0cb5f9 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: Skip suspend operation when firmware is in bad state"

parents fe153610 df6b3ee7
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -2563,11 +2563,20 @@ int msm_comm_suspend(int core_id)
	}

	mutex_lock(&core->lock);
	if (core->state != VIDC_CORE_INIT_DONE) {
		dprintk(VIDC_ERR,
				"%s - fw is not in proper state, skip suspend\n",
				__func__);
		rc = -EINVAL;
		goto exit;
	}

	rc = call_hfi_op(hdev, suspend, hdev->hfi_device_data);
	if (rc)
		dprintk(VIDC_WARN, "Failed to suspend\n");
	mutex_unlock(&core->lock);

exit:
	mutex_unlock(&core->lock);
	return rc;
}