From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: david@ixit.cz
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@kernel.org>,
linux-media@vger.kernel.org
Subject: Re: [PATCH 2/4] media: ccs: Fix sub-device index in ccs_cleanup()
Date: Mon, 23 Nov 2026 18:54:08 +0200 [thread overview]
Message-ID: <20261123165408.GD2959742@killaraus.ideasonboard.com> (raw)
In-Reply-To: <20261123-ccs-clanked-fixes-v1-2-fb2bcc87a517@ixit.cz>
On Mon, Nov 23, 2026 at 01:02:40PM +0100, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
>
> The cleanup loop in ccs_cleanup() calls v4l2_subdev_cleanup() on the
> hardcoded element ssds[2] instead of ssds[i]. On two-subdev sensors
> (without a scaler) ssds[2] is uninitialized, and on three-subdev sensors
> ssds[0] and ssds[1] are never cleaned up while ssds[2] is cleaned up
> three times.
>
> Use the loop index i.
>
> Fixes: d8bca3ed1d70 ("media: ccs: Use sub-device active state")
> Signed-off-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/media/i2c/ccs/ccs-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
> index 284cfbd89349c..df636b8df0b51 100644
> --- a/drivers/media/i2c/ccs/ccs-core.c
> +++ b/drivers/media/i2c/ccs/ccs-core.c
> @@ -3002,17 +3002,17 @@ static int ccs_registered(struct v4l2_subdev *subdev)
> }
>
> static void ccs_cleanup(struct ccs_sensor *sensor)
> {
> struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
> unsigned int i;
>
> for (i = 0; i < sensor->ssds_used; i++) {
> - v4l2_subdev_cleanup(&sensor->ssds[2].sd);
> + v4l2_subdev_cleanup(&sensor->ssds[i].sd);
> media_entity_cleanup(&sensor->ssds[i].sd.entity);
> }
>
> device_remove_file(&client->dev, &dev_attr_nvm);
> device_remove_file(&client->dev, &dev_attr_ident);
>
> ccs_free_controls(sensor);
> }
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2026-11-23 16:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 12:02 [PATCH 0/4] Various CCS fixes David Heidelberg via B4 Relay
2026-11-23 12:02 ` David Heidelberg
2026-11-23 12:02 ` [PATCH 1/4] media: ccs: Use dev_dbg() instead of dev_err() in ccs_enum_mbus_code() David Heidelberg via B4 Relay
2026-11-23 12:02 ` David Heidelberg
2026-11-23 16:53 ` Laurent Pinchart
2026-11-23 17:47 ` David Heidelberg
2026-11-23 12:02 ` [PATCH 2/4] media: ccs: Fix sub-device index in ccs_cleanup() David Heidelberg via B4 Relay
2026-11-23 12:02 ` David Heidelberg
2026-11-23 16:54 ` Laurent Pinchart [this message]
2026-11-23 12:02 ` [PATCH 3/4] media: ccs: Update PLL and blanking limits when pixel_array crop changes David Heidelberg via B4 Relay
2026-11-23 12:02 ` David Heidelberg
2026-11-23 12:02 ` [PATCH 4/4] media: ccs: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flip controls David Heidelberg
2026-11-23 12:02 ` David Heidelberg via B4 Relay
2026-11-23 16:55 ` [PATCH 0/4] Various CCS fixes Laurent Pinchart
2026-11-23 17:55 ` David Heidelberg
2026-11-23 18:02 ` Laurent Pinchart
2026-11-23 18:27 ` David Heidelberg
2026-11-23 18:35 ` Laurent Pinchart
2026-11-23 18:59 ` David Heidelberg
2026-12-01 7:56 ` Laurent Pinchart
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=20261123165408.GD2959742@killaraus.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=david@ixit.cz \
--cc=hverkuil@kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.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 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.