diff --git a/examples/nvme/hello_world/hello_world.c b/examples/nvme/hello_world/hello_world.c index 9baf52840..7fcdad91b 100644 --- a/examples/nvme/hello_world/hello_world.c +++ b/examples/nvme/hello_world/hello_world.c @@ -334,6 +334,12 @@ int main(int argc, char **argv) return 1; } + if (g_controllers == NULL) { + fprintf(stderr, "no NVMe controllers found\n"); + cleanup(); + return 1; + } + printf("Initialization complete.\n"); hello_world(); cleanup();