From: Keith Busch Date: Thu, 7 Dec 2017 18:03:39 +0000 (-0700) Subject: nvme-cli/intel: Return if arg parsing returns error X-Git-Tag: v1.5~15 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4fb1dce6803662ef6643f14919b3601253148903;p=users%2Fsagi%2Fnvme-cli.git nvme-cli/intel: Return if arg parsing returns error Signed-off-by: Keith Busch --- diff --git a/intel-nvme.c b/intel-nvme.c index 375b7a37..bbd1313c 100644 --- a/intel-nvme.c +++ b/intel-nvme.c @@ -680,6 +680,8 @@ static int get_internal_log(int argc, char **argv, struct command *command, stru }; fd = parse_and_open(argc, argv, desc, command_line_options, &cfg, sizeof(cfg)); + if (fd < 0) + return fd; if (cfg.log > 2 || cfg.core > 4 || cfg.lnum > 255) { free(intel); return EINVAL;