sys/exceptions: Remove unnecessary exception number bounds check
diff --git a/common/sys/exceptions.s2.c b/common/sys/exceptions.s2.c
index cbe68f8e..8a4a7fcc 100644
--- a/common/sys/exceptions.s2.c
+++ b/common/sys/exceptions.s2.c
@@ -41,10 +41,7 @@ static const char *exception_names[] = {
void except(uint32_t exception, uint32_t error_code, uint32_t ebp, uint32_t eip) {
(void)ebp;
- const char *exception_name = exception < SIZEOF_ARRAY(exception_names)
- ? exception_names[exception]
- : "Unknown";
- panic(false, "%s exception at %x. Error code: %x", exception_name, eip, error_code);
+ panic(false, "%s exception at %x. Error code: %x", exception_names[exception], eip, error_code);
}
#endif
