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

Commit c0ebe0a1 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: Fail qbuf and prepare_buf incase of error"

parents 2acbcf88 e4798a55
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -685,7 +685,11 @@ int msm_vidc_prepare_buf(void *instance, struct v4l2_buffer *b)
{
	struct msm_vidc_inst *inst = instance;

	if (!inst || !b || !valid_v4l2_buffer(b, inst))
	if (!inst || !inst->core || !b || !valid_v4l2_buffer(b, inst))
		return -EINVAL;

	if (inst->state == MSM_VIDC_CORE_INVALID ||
		inst->core->state == VIDC_CORE_INVALID)
		return -EINVAL;

	if (is_dynamic_output_buffer_mode(b, inst))
@@ -807,7 +811,11 @@ int msm_vidc_qbuf(void *instance, struct v4l2_buffer *b)
	int rc = 0;
	int i;

	if (!inst || !b || !valid_v4l2_buffer(b, inst))
	if (!inst || !inst->core || !b || !valid_v4l2_buffer(b, inst))
		return -EINVAL;

	if (inst->state == MSM_VIDC_CORE_INVALID ||
		inst->core->state == VIDC_CORE_INVALID)
		return -EINVAL;

	rc = map_and_register_buf(inst, b);