That is both really useful and a great example of why they should have stopped writing code in C decades ago. So many kernel bugs have arisen from people adding early returns without thinking about the cleanup functions, a problem that many other language platforms handle automatically on scope exit.
This ought to help with that. https://thephd.dev/c2y-the-defer-technical-specification-its...
> stopped writing code in C decades ago.
And what were they supposed to use in 2006? Free Pascal? Ada?
Must we do this on every thread about the Linux kernel?