]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
plugins/ocp: remove dead code
authorHannes Reinecke <hare@suse.de>
Fri, 22 Apr 2022 11:07:27 +0000 (13:07 +0200)
committerHannes Reinecke <hare@suse.de>
Fri, 22 Apr 2022 11:07:27 +0000 (13:07 +0200)
Found by coverity.

Signed-off-by: Hannes Reinecke <hare@suse.de>
plugins/ocp/ocp-nvme.c

index faac09d7faa7681dd4047ac09e8485e4dea4f3e5..1e7649b7d600a6ec5134e02b69a86e6c09cba07c 100644 (file)
@@ -380,11 +380,6 @@ static int get_c0_log_page(int fd, char *format)
                 }
 
                 /* print the data */
-                if (!data) {
-                        fprintf(stderr, "ERROR : OCP : Invalid buffer to read 0xC0 log\n");
-                        ret = -1;
-                        goto out;
-                }
                 switch (fmt) {
                 case NORMAL:
                         ocp_print_C0_log_normal(data);
@@ -728,13 +723,6 @@ static int get_c3_log_page(int fd, char *format)
                         }
                 }
 
-                /* print the data */
-                if (!log_data) {
-                        fprintf(stderr,
-                                "ERROR : OCP : Invalid C3 log data buffer\n");
-                        ret = -1;
-                        goto out;
-                }
                 switch (fmt) {
                 case NORMAL:
                         ocp_print_C3_log_normal(fd, log_data);