What changed, and why it matters
This commit only adds a new error code constant named TS_ENOINIT ('Not initialized') to a header file. It does not change any runtime behavior, fix a bug, or alter how the device handles errors. There is no security relevance visible in the change itself.
No security action required. Review the follow-up commits that consume TS_ENOINIT to determine whether any actual initialization-check logic has security implications.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff in core/embed/rtl/inc/rtl/error_handling.h removes two commented-out placeholder macros (TS_SPECIFIC_BASE and TS_ERROR) and introduces a single new Trezor-specific error code TS_ENOINIT mapped to 2000, with a comment explaining the offset is chosen to avoid collision with standard errno values. No call sites, initialization logic, or error-handling paths are modified.
Changed components
core/embed/rtl/inc/rtl/error_handling.hInspect captured patch +3 / −2
diff --git a/core/embed/rtl/inc/rtl/error_handling.h b/core/embed/rtl/inc/rtl/error_handling.h
index 345d0a3f2..57cbe2022 100644
--- a/core/embed/rtl/inc/rtl/error_handling.h
+++ b/core/embed/rtl/inc/rtl/error_handling.h
@@ -44,8 +44,9 @@ typedef struct {
#define TS_EIO ts_make(EIO)
#define TS_EBADMSG ts_make(EBADMSG)
-// #define TS_SPECIFIC_BASE 1000
-// #define TS_ERROR ts_make(TS_SPECIFIC_BASE + 0) // Generic error
+/** List of Trezor-specific error codes with offset from 2000 to avoid mixing
+ * with standard errno codes */
+#define TS_ENOINIT ts_make(2000) /* Not initialized */
/**
* Extracts the code integer value from status structure.
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.