OSDN Git Service

media: vicodec: change variable name for the return value of v4l2_fwht_encode
authorDafna Hirschfeld <dafna3@gmail.com>
Wed, 6 Mar 2019 21:13:27 +0000 (16:13 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 25 Mar 2019 17:32:43 +0000 (13:32 -0400)
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: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vicodec/vicodec-core.c

index 027daa5..4776575 100644 (file)
@@ -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);