On Wed, Mar 11, 2026 at 01:35:06AM +0530, Sanjay Chitroda wrote:
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.
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