Skip to content

Commit c8adafd

Browse files
committed
zns: fix check if global context has valid
When the code was switched over to use nvme_scan_topology, the error check introduced was wrong. Fixes: 7daa1e9 ("plugins: replace nvme_scan with nvme_scan_topology") Signed-off-by: Daniel Wagner <[email protected]>
1 parent 31fbe00 commit c8adafd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/zns/zns.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static int list(int argc, char **argv, struct command *acmd,
107107
struct table *t = table_init_with_columns(columns, ARRAY_SIZE(columns));
108108

109109
ctx = libnvme_create_global_ctx(stdout, DEFAULT_LOGLEVEL);
110-
if (ctx) {
110+
if (!ctx) {
111111
fprintf(stderr, "Failed to create root object\n");
112112
return -ENOMEM;
113113
}

0 commit comments

Comments
 (0)