]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
plugins/nbft: Fix nbft-plugin.c linux kernel check patch warnings
authorTokunori Ikegami <ikegami.t@gmail.com>
Sun, 4 Jun 2023 00:47:06 +0000 (09:47 +0900)
committerDaniel Wagner <wagi@monom.org>
Tue, 6 Jun 2023 09:01:09 +0000 (11:01 +0200)
Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
plugins/nbft/nbft-plugin.c

index 6ae2525a55c8bc2bfe5b710bf941d738b713346c..5ea834f948b4224dc3da299ed3a875735f446b90 100644 (file)
@@ -323,7 +323,7 @@ static int json_show_nbfts(struct list_head *nbft_list, bool show_subsys,
 
        nbft_json_array = json_create_array();
        if (!nbft_json_array)
-               return ENOMEM;
+               return -ENOMEM;
 
        list_for_each(nbft_list, entry, node) {
                nbft_json = nbft_to_json(entry->nbft, show_subsys, show_hfi, show_discovery);
@@ -341,7 +341,7 @@ static int json_show_nbfts(struct list_head *nbft_list, bool show_subsys,
        return 0;
 fail:
        json_free_object(nbft_json_array);
-       return ENOMEM;
+       return -ENOMEM;
 }
 
 static void print_nbft_hfi_info(struct nbft_info *nbft)
@@ -553,7 +553,7 @@ int show_nbft(int argc, char **argv, struct command *cmd, struct plugin *plugin)
        else if (!strcmp(format, "json"))
                flags = JSON;
        else
-               return EINVAL;
+               return -EINVAL;
 
        list_head_init(&nbft_list);
        ret = read_nbft_files(&nbft_list, nbft_path);