IS_ERR(9)
π IS_ERR (section 9, Kernel API Manual)
okay bestie, gather round, because this one is short but it is load-bearing π«Ά
β¨ NAME β¨
IS_ERR β the little macro that tells you whether a pointer is actually an error pointer. That's it. That's the whole job. And she does it flawlessly. π
πΈ SYNOPSIS πΈ
bool IS_ERR (__force const void *ptr );
like yes, that's genuinely all the syntax. no extra args, no funny business, just vibes and a bool. β¨
π ARGUMENTS π
ptrβ the pointer you want to check. the one you're side-eyeing. the one you're not sure about. hand her over and letIS_ERRdo the vibe check. π
β RETURN β
trueβ ifptris an error pointer. she's an error, girlie. πfalseβ otherwise. she's fine. false alarm. carry on. π
no cap, this is a two-outcome situation and both outcomes are literally in the docs, so don't go expecting a third one. that's the whole return story. π
π¦ SEE ALSO π¦
- Kernel file
./include/linux/err.hβ the home base, the mothership, where all of this lives IS_ERR_VALUE(9)ERR_PTR(9)INIT_ERR_PTR(9)PTR_ERR(9)IS_ERR_OR_NULL(9)ERR_CAST(9)PTR_ERR_OR_ZERO(9)
like, the whole error-pointer friend group π go read them, they're all serving their own purpose and they all ate. π₯
and that's the page, bestie β straight from ./include/linux, dated October 2026, living under the IS_ERR(9) name in the Kernel API Manual. mwah π
ππ
π¦ 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