Skip to content

Commit f6b868d

Browse files
committed
ref(core/remio): test REMIO_DEV_FRONTEND explicitly
Signed-off-by: João Peixoto <[email protected]>
1 parent dec517e commit f6b868d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/remio.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,11 +456,14 @@ void remio_init(void)
456456
device->config.backend.vm_id = vm_id;
457457
device->config.backend.interrupt = dev->interrupt;
458458
device->config.backend.cpu_id = (cpuid_t)-1;
459-
} else {
459+
} else if (dev->type == REMIO_DEV_FRONTEND) {
460460
device->config.frontend.vm_id = vm_id;
461461
device->config.frontend.interrupt = dev->interrupt;
462462
device->config.frontend.cpu_id = (cpuid_t)-1;
463463
}
464+
else {
465+
ERROR("Unknown Remote I/O device type");
466+
}
464467
}
465468
}
466469

0 commit comments

Comments
 (0)