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

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

From: Andy Shevchenko <hidden>
Date: 2026-03-10 21:04:55
Also in: linux-iio, linux-media, linux-mediatek, linux-staging, lkml

On Wed, Mar 11, 2026 at 01:35:06AM +0530, Sanjay Chitroda wrote:
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.
Do you put random people in the Cc list?
You may try my script [1] to see the difference.

[1]: https://github.com/andy-shev/home-bin-tools/blob/master/ge2maintainer.sh

-- 
With Best Regards,
Andy Shevchenko


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help