public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] drivers: Simplify cleanup paths using __free
@ 2026-03-10 20:05 Sanjay Chitroda
  2026-03-10 20:05 ` [PATCH 1/7] staging: greybus: simplify cleanup " Sanjay Chitroda
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Sanjay Chitroda @ 2026-03-10 20:05 UTC (permalink / raw)
  To: jic23, m.tretter, mchehab, p.zabel, tiffany.lin, andrew-ct.chen,
	yunfei.dong, matthias.bgg, angelogioacchino.delregno, johan,
	elder, gregkh, pure.logic
  Cc: dlechner, nuno.sa, andy, kernel, kees, nabijaczleweli,
	marcelo.schmitt1, maudspierings, hverkuil+cisco, ribalda,
	straube.linux, dan.carpenter, lukagejak5, ethantidmore06,
	samasth.norway.ananda, karanja99erick, s9430939, tglx, mingo,
	sun.jian.kdev, weibu, linux-iio, linux-kernel, linux-media,
	linux-arm-kernel, linux-mediatek, greybus-dev, linux-staging,
	sanjayembeddedse, skhan

From: Sanjay Chitroda <sanjayembeddedse@gmail.com>

Hi all,

This patch series replaces manual cleanup and explicit kfree() calls with
the __free attribute from <linux/cleanup.h>. This modernizes the memory
management style and simplifies common error paths without altering any
functional behavior.

The __free attribute provides automatic scope-based cleanup, making
resource management clearer and reducing the chances of missing cleanup
on early returns.

No functional changes are intended in this series.

Testing:
  - Compiled with W=1
  - Build-tested on i86_64

Based on:
  <linux-v7.0-rc2>

Feel free to share your valuable input in context of the cleanup API.

Thanks,
Sanjay Chitroda

Sanjay Chitroda (7):
  staging: greybus: simplify cleanup using __free
  iio: ssp_sensors: simplify cleanup using __free
  iio: st_sensors: simplify cleanup using __free
  media: mediatek: vcodec: simplify cleanup using __free
  media: chips-media: coda: simplify cleanup using __free
  media: allegro: simplify cleanup using __free
  staging: rtl8723bs: simplify cleanup using __free

 drivers/iio/common/ssp_sensors/ssp_spi.c      |  9 +-
 .../iio/common/st_sensors/st_sensors_core.c   |  7 +-
 .../media/platform/allegro-dvt/allegro-core.c | 95 +++++--------------
 .../platform/chips-media/coda/coda-bit.c      |  4 +-
 .../platform/chips-media/coda/coda-jpeg.c     | 39 ++++----
 .../mediatek/vcodec/common/mtk_vcodec_dbgfs.c |  3 +-
 drivers/staging/greybus/camera.c              | 27 ++----
 drivers/staging/greybus/loopback.c            | 35 +++-----
 drivers/staging/greybus/raw.c                 |  6 +-
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 13 +--
 drivers/staging/rtl8723bs/hal/sdio_ops.c      | 37 ++------
 11 files changed, 78 insertions(+), 197 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-03-19 21:09 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-10 20:05 [PATCH 0/7] drivers: Simplify cleanup paths using __free Sanjay Chitroda
2026-03-10 20:05 ` [PATCH 1/7] staging: greybus: simplify cleanup " Sanjay Chitroda
2026-03-10 21:07   ` Andy Shevchenko
2026-03-11  6:51     ` Dan Carpenter
2026-03-11  7:06       ` Greg KH
2026-03-10 20:05 ` [PATCH 2/7] iio: ssp_sensors: " Sanjay Chitroda
2026-03-10 21:11   ` Andy Shevchenko
2026-03-10 20:05 ` [PATCH 3/7] iio: st_sensors: " Sanjay Chitroda
2026-03-11  0:04   ` David Lechner
2026-03-10 20:05 ` [PATCH 4/7] media: mediatek: vcodec: " Sanjay Chitroda
2026-03-19 21:08   ` Nicolas Dufresne
2026-03-10 20:05 ` [PATCH 5/7] media: chips-media: coda: " Sanjay Chitroda
2026-03-10 20:05 ` [PATCH 6/7] media: allegro: " Sanjay Chitroda
2026-03-10 20:05 ` [PATCH 7/7] staging: rtl8723bs: " Sanjay Chitroda
2026-03-10 21:42   ` Andrew Lunn
2026-03-11  6:45   ` Greg KH
2026-03-10 21:04 ` [PATCH 0/7] drivers: Simplify cleanup paths " Andy Shevchenko
2026-03-10 21:52 ` David Lechner
2026-03-11  1:57   ` Sanjay Chitroda
2026-03-11  5:42 ` Luka Gejak

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