Linux-mediatek Archive mirror
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>,
	tiffany.lin@mediatek.com,  andrew-ct.chen@mediatek.com,
	yunfei.dong@mediatek.com, mchehab@kernel.org,
	 matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
	 laurent.pinchart@ideasonboard.com, hverkuil+cisco@kernel.org,
	 p.zabel@pengutronix.de, benjamin.gaignard@collabora.com,
	 xiaoyong.lu@mediatek.com, mingjia.zhang@mediatek.com
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,  stable@vger.kernel.org
Subject: Re: [PATCH v2] media: mediatek: vcodec: free working buf in vdec_vp9_slice_setup_single()
Date: Fri, 01 May 2026 14:43:42 -0400	[thread overview]
Message-ID: <fae38f0f4ab8e8176cb6c5a37246e7aa5b5409d8.camel@ndufresne.ca> (raw)
In-Reply-To: <20260429070119.181876-1-lihaoxiang@isrc.iscas.ac.cn>

[-- Attachment #1: Type: text/plain, Size: 1764 bytes --]

Le mercredi 29 avril 2026 à 15:01 +0800, Haoxiang Li a écrit :
> Add an error path label in vdec_vp9_slice_setup_single()
> and call vdec_vp9_slice_free_working_buffer() to free
> working buffer.
> 
> Fixes: b0f407c19648 ("media: mediatek: vcodec: add vp9 decoder driver for
> mt8186")
> Cc: stable@vger.kernel.org
> Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
> ---
> Changes in v2:
>  - Remove vdec_vp9_slice_setup_prob_buffer()'s return
>    value, since it never fails. Thanks, Nicolas!
> ---
>  .../mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c   | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 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..d034d84ad7f1 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
> @@ -1808,17 +1808,16 @@ static int vdec_vp9_slice_setup_single(struct
> vdec_vp9_slice_instance *instance,
>  
>  	vdec_vp9_slice_setup_single_buffer(instance, pfc, vsi, bs, fb);
>  	vdec_vp9_slice_setup_seg_buffer(instance, vsi, &instance->seg[0]);
> -
> -	ret = vdec_vp9_slice_setup_prob_buffer(instance, vsi);

Same as previous patch.

regards,
Nicolas

> -	if (ret)
> -		goto err;
> +	vdec_vp9_slice_setup_prob_buffer(instance, vsi);
>  
>  	ret = vdec_vp9_slice_setup_tile_buffer(instance, vsi, bs);
>  	if (ret)
> -		goto err;
> +		goto alloc_err;
>  
>  	return 0;
>  
> +alloc_err:
> +	vdec_vp9_slice_free_working_buffer(instance);
>  err:
>  	return ret;
>  }

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2026-05-01 18:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-29  7:01 [PATCH v2] media: mediatek: vcodec: free working buf in vdec_vp9_slice_setup_single() Haoxiang Li
2026-05-01 18:43 ` Nicolas Dufresne [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fae38f0f4ab8e8176cb6c5a37246e7aa5b5409d8.camel@ndufresne.ca \
    --to=nicolas@ndufresne.ca \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=hverkuil+cisco@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lihaoxiang@isrc.iscas.ac.cn \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=mingjia.zhang@mediatek.com \
    --cc=p.zabel@pengutronix.de \
    --cc=stable@vger.kernel.org \
    --cc=tiffany.lin@mediatek.com \
    --cc=xiaoyong.lu@mediatek.com \
    --cc=yunfei.dong@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).