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.

Must we do this on every thread about the Linux kernel?

The beatings will continue until morale improves

yeah but Linux is love, linux is life. if you really want to get the beatings going:

Rust > C and GNU/Linux should be Rust.

[flagged]

> stopped writing code in C decades ago.

And what were they supposed to use in 2006? Free Pascal? Ada?

Someone suggested C++ and you should see the response from Linus

https://harmful.cat-v.org/software/c++/linus