All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pratyush Yadav <p.yadav@ti.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: "Pratyush Yadav" <p.yadav@ti.com>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Nikhil Devshatwar" <nikhil.nd@ti.com>,
	"Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>,
	"Benoit Parrot" <bparrot@ti.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-media@vger.kernel.org
Subject: [PATCH v6 02/14] media: cadence: csi2rx: Cleanup media entity properly
Date: Fri, 21 Jan 2022 19:58:52 +0530	[thread overview]
Message-ID: <20220121142904.4091481-3-p.yadav@ti.com> (raw)
In-Reply-To: <20220121142904.4091481-1-p.yadav@ti.com>

Call media_entity_cleanup() in probe error path and remove to make sure
the media entity is cleaned up properly.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

---

Changes in v6:
- Add Laurent's R-by.

Changes in v5:
- New in v5.

 drivers/media/platform/cadence/cdns-csi2rx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/platform/cadence/cdns-csi2rx.c b/drivers/media/platform/cadence/cdns-csi2rx.c
index 2a23da6a0b8e..2547903f2e8e 100644
--- a/drivers/media/platform/cadence/cdns-csi2rx.c
+++ b/drivers/media/platform/cadence/cdns-csi2rx.c
@@ -471,6 +471,7 @@ static int csi2rx_probe(struct platform_device *pdev)
 err_cleanup:
 	v4l2_async_nf_unregister(&csi2rx->notifier);
 	v4l2_async_nf_cleanup(&csi2rx->notifier);
+	media_entity_cleanup(&csi2rx->subdev.entity);
 err_free_priv:
 	kfree(csi2rx);
 	return ret;
@@ -483,6 +484,7 @@ static int csi2rx_remove(struct platform_device *pdev)
 	v4l2_async_nf_unregister(&csi2rx->notifier);
 	v4l2_async_nf_cleanup(&csi2rx->notifier);
 	v4l2_async_unregister_subdev(&csi2rx->subdev);
+	media_entity_cleanup(&csi2rx->subdev.entity);
 	kfree(csi2rx);
 
 	return 0;
-- 
2.34.1


  parent reply	other threads:[~2022-01-21 14:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21 14:28 [PATCH v6 00/14] CSI2RX support on J721E Pratyush Yadav
2022-01-21 14:28 ` [PATCH v6 01/14] media: cadence: csi2rx: Unregister v4l2 async notifier Pratyush Yadav
2022-01-21 14:28 ` Pratyush Yadav [this message]
2022-01-21 14:28 ` [PATCH v6 03/14] media: cadence: csi2rx: Add get_fmt and set_fmt pad ops Pratyush Yadav
2022-01-23 15:13   ` Laurent Pinchart
2022-01-21 14:28 ` [PATCH v6 04/14] media: cadence: csi2rx: Add external DPHY support Pratyush Yadav
2022-01-28  4:29   ` kernel test robot
2022-01-21 14:28 ` [PATCH v6 05/14] media: cadence: csi2rx: Soft reset the streams before starting capture Pratyush Yadav
2022-01-21 14:28 ` [PATCH v6 06/14] media: cadence: csi2rx: Set the STOP bit when stopping a stream Pratyush Yadav
2022-01-21 14:28 ` [PATCH v6 07/14] media: cadence: csi2rx: Fix stream data configuration Pratyush Yadav
2022-01-21 14:28 ` [PATCH v6 08/14] media: cadence: csi2rx: Populate subdev devnode Pratyush Yadav
2022-01-21 14:28 ` [PATCH v6 09/14] media: cadence: csi2rx: Add link validation Pratyush Yadav
2022-01-21 14:29 ` [PATCH v6 10/14] media: Re-structure TI platform drivers Pratyush Yadav
2022-01-21 14:29 ` [PATCH v6 11/14] media: ti: Add CSI2RX support for J721E Pratyush Yadav
2022-01-23 18:25   ` Laurent Pinchart
2022-05-11  9:54     ` Pratyush Yadav
2022-01-24  9:00   ` Sakari Ailus
2022-01-21 14:29 ` [PATCH v6 12/14] media: dt-bindings: Make sure items in data-lanes are unique Pratyush Yadav
2022-01-21 14:29 ` [PATCH v6 13/14] media: dt-bindings: Add DT bindings for TI J721E CSI2RX driver Pratyush Yadav
2022-01-21 14:29 ` [PATCH v6 14/14] media: dt-bindings: Convert Cadence CSI2RX binding to YAML Pratyush Yadav
2022-11-09 16:57 ` [PATCH v6 00/14] CSI2RX support on J721E Martyn Welch
2023-03-14 12:19   ` Vaishnav Achath

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=20220121142904.4091481-3-p.yadav@ti.com \
    --to=p.yadav@ti.com \
    --cc=bparrot@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mripard@kernel.org \
    --cc=nikhil.nd@ti.com \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomi.valkeinen@ideasonboard.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.