Thread (20 messages) 20 messages, 8 authors, 2026-03-19

Re: [PATCH 0/7] drivers: Simplify cleanup paths using __free

From: Sanjay Chitroda <hidden>
Date: 2026-03-11 02:18:17
Also in: linux-iio, linux-media, linux-mediatek, linux-staging, lkml


On 11 March 2026 3:22:28 am IST, David Lechner [off-list ref] wrote:
On 3/10/26 3:05 PM, Sanjay Chitroda wrote:
quoted
From: Sanjay Chitroda <redacted>

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
There is no reason to put patches from different subsystems
in the same series when there is no dependency between them.
It just make for more noise for everyone.
Thanks for the feedback. I will split unrelated patches into
separate series per subsystem or individual in future submissions.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help