INIT_ERR_PTR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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