Commit f902796a authored by Dafna Hirschfeld's avatar Dafna Hirschfeld Committed by Mauro Carvalho Chehab
Browse files

media: vicodec: change variable name for the return value of v4l2_fwht_encode



v4l2_fwht_encode returns either an error code on
failure or the size of the compressed frame on
success. So change the var assigned to it from
'ret' to 'comp_sz_or_errcode' to clarify that.

Signed-off-by: default avatarDafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 09ca38a5
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -177,13 +177,14 @@ static int device_process(struct vicodec_ctx *ctx,

	if (ctx->is_enc) {
		struct vicodec_q_data *q_src;
		int comp_sz_or_errcode;

		q_src = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT);
		state->info = q_src->info;
		ret = v4l2_fwht_encode(state, p_src, p_dst);
		if (ret < 0)
			return ret;
		vb2_set_plane_payload(&dst_vb->vb2_buf, 0, ret);
		comp_sz_or_errcode = v4l2_fwht_encode(state, p_src, p_dst);
		if (comp_sz_or_errcode < 0)
			return comp_sz_or_errcode;
		vb2_set_plane_payload(&dst_vb->vb2_buf, 0, comp_sz_or_errcode);
	} else {
		unsigned int comp_frame_size = ntohl(ctx->state.header.size);