From: Biren Pandya <birenpandya@gmail.com>
To: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Cc: "Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>,
"Jacopo Mondi" <jacopo+renesas@jmondi.org>,
"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
"Sakari Ailus" <sakari.ailus@linux.intel.com>,
"Biju Das" <biju.das.jz@bp.renesas.com>,
"Hans Verkuil" <hverkuil+cisco@kernel.org>,
"Tommaso Merciai" <tommaso.merciai.xr@bp.renesas.com>,
"Biren Pandya" <birenpandya@gmail.com>
Subject: [PATCH v4 2/4] media: renesas: csisp: Add missing media_entity_cleanup()
Date: Sun, 5 Jul 2026 01:45:09 +0530 [thread overview]
Message-ID: <20260704201506.82524-8-birenpandya@gmail.com> (raw)
In-Reply-To: <20260704201506.82524-6-birenpandya@gmail.com>
The probe error path and remove function are missing calls to
media_entity_cleanup(). Add a dedicated error_entity label so the
cleanup is only invoked when media_entity_pads_init() has actually
succeeded. This ensures that the teardown logic properly mirrors
initialization.
Signed-off-by: Biren Pandya <birenpandya@gmail.com>
---
drivers/media/platform/renesas/rcar-isp/csisp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/renesas/rcar-isp/csisp.c b/drivers/media/platform/renesas/rcar-isp/csisp.c
index 8fb2cc3b56503..61558a71ee358 100644
--- a/drivers/media/platform/renesas/rcar-isp/csisp.c
+++ b/drivers/media/platform/renesas/rcar-isp/csisp.c
@@ -539,7 +539,7 @@ static int risp_probe(struct platform_device *pdev)
ret = v4l2_subdev_init_finalize(&isp->subdev);
if (ret)
- goto error_notifier;
+ goto error_entity;
ret = v4l2_async_register_subdev(&isp->subdev);
if (ret < 0)
@@ -551,6 +551,8 @@ static int risp_probe(struct platform_device *pdev)
error_subdev:
v4l2_subdev_cleanup(&isp->subdev);
+error_entity:
+ media_entity_cleanup(&isp->subdev.entity);
error_notifier:
v4l2_async_nf_unregister(&isp->notifier);
v4l2_async_nf_cleanup(&isp->notifier);
@@ -569,6 +571,7 @@ static void risp_remove(struct platform_device *pdev)
v4l2_async_unregister_subdev(&isp->subdev);
v4l2_subdev_cleanup(&isp->subdev);
+ media_entity_cleanup(&isp->subdev.entity);
pm_runtime_disable(&pdev->dev);
}
--
2.50.1 (Apple Git-155)
next prev parent reply other threads:[~2026-07-04 20:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-04 20:15 [PATCH v4 0/4] media: renesas: Add missing media_entity_cleanup() calls Biren Pandya
2026-07-04 20:15 ` [PATCH v4 1/4] media: renesas: rcar-csi2: Add missing media_entity_cleanup() Biren Pandya
2026-07-04 20:15 ` Biren Pandya [this message]
2026-07-04 20:15 ` [PATCH v4 3/4] media: renesas: rcar-core: " Biren Pandya
2026-07-04 20:15 ` [PATCH v4 4/4] media: renesas: rzg2l-core: " Biren Pandya
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=20260704201506.82524-8-birenpandya@gmail.com \
--to=birenpandya@gmail.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=hverkuil+cisco@kernel.org \
--cc=jacopo+renesas@jmondi.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=sakari.ailus@linux.intel.com \
--cc=tommaso.merciai.xr@bp.renesas.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