From: Greg KH <gregkh@linuxfoundation.org>
To: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Cc: jackson.lee@chipsnmedia.com, mchehab@kernel.org,
bob.beckett@collabora.com, sebastian.fricke@collabora.com,
dafna.hirschfeld@collabora.com, nicolas.dufresne@collabora.com,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] media: chips-media: wave5: fix a potential memory leak in wave5_vdi_init()
Date: Sun, 25 Jan 2026 15:27:26 +0100 [thread overview]
Message-ID: <2026012518-carol-hankering-123d@gregkh> (raw)
In-Reply-To: <20260125141915.2088123-1-lihaoxiang@isrc.iscas.ac.cn>
On Sun, Jan 25, 2026 at 10:19:15PM +0800, Haoxiang Li wrote:
> Add wave5_vdi_free_dma_memory() in the error path of
> wave5_vdi_init() to prevent a potential memory leak.
>
> Fixes: 45d1a2b93277 ("media: chips-media: wave5: Add vpuapi layer")
> Cc: stable@vger.kernel.org
> Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
> ---
> drivers/media/platform/chips-media/wave5/wave5-vdi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/platform/chips-media/wave5/wave5-vdi.c b/drivers/media/platform/chips-media/wave5/wave5-vdi.c
> index bb13267ced38..8f71920a8a35 100644
> --- a/drivers/media/platform/chips-media/wave5/wave5-vdi.c
> +++ b/drivers/media/platform/chips-media/wave5/wave5-vdi.c
> @@ -49,6 +49,7 @@ int wave5_vdi_init(struct device *dev)
>
> if (!PRODUCT_CODE_W_SERIES(vpu_dev->product_code)) {
> WARN_ONCE(1, "unsupported product code: 0x%x\n", vpu_dev->product_code);
> + wave5_vdi_free_dma_memory(vpu_dev, &vpu_dev->common_mem);
> return -EOPNOTSUPP;
> }
>
> --
> 2.25.1
>
>
How was this found and tested?
thanks,
greg k-h
next prev parent reply other threads:[~2026-01-25 14:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-25 14:19 [PATCH] media: chips-media: wave5: fix a potential memory leak in wave5_vdi_init() Haoxiang Li
2026-01-25 14:27 ` Greg KH [this message]
2026-03-19 17:43 ` Nicolas Dufresne
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=2026012518-carol-hankering-123d@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=bob.beckett@collabora.com \
--cc=dafna.hirschfeld@collabora.com \
--cc=jackson.lee@chipsnmedia.com \
--cc=lihaoxiang@isrc.iscas.ac.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nicolas.dufresne@collabora.com \
--cc=sebastian.fricke@collabora.com \
--cc=stable@vger.kernel.org \
/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