INIT_ERR_PTR(9)
πΈ INIT_ERR_PTR(9) β like, the Kernel API Manual page you didn't know you needed π
okay bestie, buckle up, this is INIT_ERR_PTR from section 9 of the Kernel API Manual and it's literally a tiny little macro with main character energy π
β¨ NAME β¨
INIT_ERR_PTR β init a const error pointer. that's it. that's the whole vibe π¦
β¨ SYNOPSIS β¨
INIT_ERR_PTR (error );
β¨ ARGUMENTS β¨
errorβ a negative error code. yes queen, it's gotta be negative, that's the whole point π
β¨ DESCRIPTION β¨
so it works exactly like ERR_PTR, no cap, but here's the slay: you can use this one to initialize static variables π«Ά that's the difference. that's the flex. ERR_PTR could never (well, it could, but not for statics, iykyk) β¨
β¨ SEE ALSO β¨
okay so the whole squad is here, all from the kernel file ./include/linux/err.h:
like, they all live in the same file, they're literally a friend group π
and that's the page!! mwah π this lil icon comes from ./include/linux, October 2026, and it's giving vintage-but-make-it-fresh π go forth and init your const error pointers responsibly, bestie πβ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms