Re: [PATCH 1/4] media: mediatek: vcodec: remove redundant return value of vdec_vp9_slice_setup_lat_buffer()
From: Nicolas Dufresne
Date: Wed Jul 15 2026 - 17:30:06 EST
Le mercredi 06 mai 2026 à 16:42 +0800, Haoxiang Li a écrit :
> vdec_vp9_slice_setup_lat_buffer() never fails, remove the 'return 0' from
> vdec_vp9_slice_setup_lat_buffer() and modify its signature.
> Also, remove the return value check in vdec_vp9_slice_setup_lat().
>
> Signed-off-by: Haoxiang Li <lihaoxiang@xxxxxxxxxxxxxxxx>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@xxxxxxxxxxxxx>
> ---
> .../mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git
> a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c
> b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c
> index cd1935014d76..092fd34e21d2 100644
> ---
> a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c
> +++
> b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c
> @@ -974,7 +974,7 @@ static int vdec_vp9_slice_setup_pfc(struct
> vdec_vp9_slice_instance *instance,
> return 0;
> }
>
> -static int vdec_vp9_slice_setup_lat_buffer(struct vdec_vp9_slice_instance
> *instance,
> +static void vdec_vp9_slice_setup_lat_buffer(struct vdec_vp9_slice_instance
> *instance,
> struct vdec_vp9_slice_vsi *vsi,
> struct mtk_vcodec_mem *bs,
> struct vdec_lat_buf *lat_buf)
> @@ -1011,8 +1011,6 @@ static int vdec_vp9_slice_setup_lat_buffer(struct
> vdec_vp9_slice_instance *insta
>
> vsi->row_info.buf = 0;
> vsi->row_info.size = 0;
> -
> - return 0;
> }
>
> static int vdec_vp9_slice_setup_prob_buffer(struct vdec_vp9_slice_instance
> *instance,
> @@ -1166,9 +1164,7 @@ static int vdec_vp9_slice_setup_lat(struct
> vdec_vp9_slice_instance *instance,
> if (ret)
> goto err;
>
> - ret = vdec_vp9_slice_setup_lat_buffer(instance, vsi, bs, lat_buf);
> - if (ret)
> - goto err;
> + vdec_vp9_slice_setup_lat_buffer(instance, vsi, bs, lat_buf);
>
> vdec_vp9_slice_setup_seg_buffer(instance, vsi, &instance->seg[0]);
>
Attachment:
signature.asc
Description: This is a digitally signed message part