only:nicer error message

This commit is contained in:
rusefillc 2023-12-18 00:39:05 -05:00
parent 5e00fb7fa1
commit f54d7d56bc
1 changed files with 4 additions and 3 deletions

View File

@ -228,13 +228,14 @@ int gpiochips_init(void) {
if (chip->base == Gpio::Unassigned)
continue;
if (chip->chip->init() < 0) {
int ret = chip->chip->init();
if (ret < 0) {
#if EFI_PROD_CODE
// todo: adjust unit tests to validate this fatal
criticalError("Failed to init chip %d", i);
criticalError("Failed to init chip %d: %d", i, ret);
#else
chip->base = Gpio::Unassigned;
#endif
#endif
} else {
pins_added += chip->size;
}