Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH v2 0/3] media: i2c: Automate fwnode lifecycle with __free() scope guards
@ 2026-06-16  8:15 Biren Pandya
  2026-06-16  8:15 ` [PATCH v2 1/3] media: i2c: ov5640: Drop manual fwnode_handle_put() via scope-based cleanup Biren Pandya
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Biren Pandya @ 2026-06-16  8:15 UTC (permalink / raw)
  To: Sakari Ailus, Mauro Carvalho Chehab, linux-media
  Cc: Dave Stevenson, Manivannan Sadhasivam, Steve Longerbeam,
	Biren Pandya

This series updates the firmware node parsing logic across three highly
active V4L2 I2C sensor drivers (ov5640, imx290, and imx219) to utilize
the modern __free(fwnode_handle) scoped guard macro introduced in
<linux/cleanup.h>.

By binding the lifecycle of the fwnode_handle directly to the
variable's scope, we eliminate the need for manual fwnode_handle_put()
calls. This permanently removes the risk of subtle early-free or
missing-put memory leaks in error-handling paths and establishes a
cleaner pattern for newly merged drivers to follow.
Biren Pandya (3):
  media: i2c: ov5640: Drop manual fwnode_handle_put() via scope-based
    cleanup
  media: i2c: imx290: Drop manual fwnode_handle_put() via scope-based
    cleanup
  media: i2c: imx219: Drop manual fwnode_handle_put() via scope-based
    cleanup

 drivers/media/i2c/imx219.c | 4 ++--
 drivers/media/i2c/imx290.c | 4 ++--
 drivers/media/i2c/ov5640.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)


base-commit: 424280953322cf66314f3ba5e2d1ef345f21c770
-- 
2.50.1 (Apple Git-155)


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-07-08 13:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-16  8:15 [PATCH v2 0/3] media: i2c: Automate fwnode lifecycle with __free() scope guards Biren Pandya
2026-06-16  8:15 ` [PATCH v2 1/3] media: i2c: ov5640: Drop manual fwnode_handle_put() via scope-based cleanup Biren Pandya
2026-07-08  8:54   ` Sakari Ailus
2026-07-08 12:49   ` [PATCH v3] media: i2c: ov5640: use scoped fwnode_handle endpoint cleanup Biren Pandya
2026-07-08 13:27     ` Sakari Ailus
2026-06-16  8:15 ` [PATCH v2 2/3] media: i2c: imx290: Drop manual fwnode_handle_put() via scope-based cleanup Biren Pandya
2026-06-17  5:42   ` Manivannan Sadhasivam
2026-07-08 13:16   ` [PATCH v3] " Biren Pandya
2026-06-16  8:15 ` [PATCH v2 3/3] media: i2c: imx219: " Biren Pandya
2026-06-17  9:30   ` Dave Stevenson
2026-07-08 13:17   ` [PATCH v3] " Biren Pandya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox