[PATCH 1/4] media: mediatek: vcodec: remove redundant return value of vdec_vp9_slice_setup_lat_buffer()

Nicolas Dufresne nicolas at ndufresne.ca
Wed Jul 15 14:29:53 PDT 2026


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 at isrc.iscas.ac.cn>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne at collabora.com>

> ---
>  .../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]);
>  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20260715/9fefd99c/attachment.sig>


More information about the Linux-mediatek mailing list