From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
To: David Carlier <devnexen@gmail.com>
Cc: linux-media@vger.kernel.org, dan.scally@ideasonboard.com,
jacopo.mondi@ideasonboard.com, mchehab@kernel.org,
nayden.kanchev@arm.com, hverkuil+cisco@kernel.org,
stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: mali-c55: Free the ISP control handler on unregister
Date: Wed, 30 Sep 2026 17:24:48 +0200 [thread overview]
Message-ID: <ar0pSq6bkG1e4wOM@zed> (raw)
In-Reply-To: <20260906071112.48259-1-devnexen@gmail.com>
Hi David
On Sun, Sep 06, 2026 at 08:10:30AM +0100, David Carlier wrote:
> mali_c55_isp_init_controls() initialises isp->handler and adds the
> capabilities control, but mali_c55_unregister_isp() never frees it.
> Neither v4l2_device_unregister_subdev() nor v4l2_subdev_cleanup()
> touches sd->ctrl_handler, so the handler and its control are leaked on
> every unbind or module removal. The probe error path already frees it,
> and the TPG subdevice does so in its own unregister function.
>
> Fixes: d5f281f3dd29 ("media: mali-c55: Add Mali-C55 ISP driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: David Carlier <devnexen@gmail.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> ---
> drivers/media/platform/arm/mali-c55/mali-c55-isp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-isp.c b/drivers/media/platform/arm/mali-c55/mali-c55-isp.c
> index e128adf6ee37..c45a3760e084 100644
> --- a/drivers/media/platform/arm/mali-c55/mali-c55-isp.c
> +++ b/drivers/media/platform/arm/mali-c55/mali-c55-isp.c
> @@ -641,6 +641,7 @@ void mali_c55_unregister_isp(struct mali_c55 *mali_c55)
>
> mutex_destroy(&isp->capture_lock);
> v4l2_device_unregister_subdev(&isp->sd);
> + v4l2_ctrl_handler_free(&isp->handler);
> v4l2_subdev_cleanup(&isp->sd);
> media_entity_cleanup(&isp->sd.entity);
> }
> --
> 2.55.0
>
>
prev parent reply other threads:[~2026-09-30 15:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 7:10 [PATCH] media: mali-c55: Free the ISP control handler on unregister David Carlier
2026-09-30 15:24 ` Jacopo Mondi [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=ar0pSq6bkG1e4wOM@zed \
--to=jacopo.mondi@ideasonboard.com \
--cc=dan.scally@ideasonboard.com \
--cc=devnexen@gmail.com \
--cc=hverkuil+cisco@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nayden.kanchev@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.