From 6427803252354203dfa5d816c6a8dc0ae385051e Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 20 Sep 2021 10:33:33 +0200 Subject: [PATCH] cov: pvck validates setup_device return value --- tools/pvck.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/pvck.c b/tools/pvck.c index 49bcb5fd3..629e1feee 100644 --- a/tools/pvck.c +++ b/tools/pvck.c @@ -3178,9 +3178,10 @@ int pvck(struct cmd_context *cmd, int argc, char **argv) * but this is here to preserve the historical output. */ - if (argc == 1) - setup_device(cmd, argv[0]); - else if (!setup_devices(cmd)) + if (argc == 1) { + if (!setup_device(cmd, argv[0])) + return_ECMD_FAILED; + } else if (!setup_devices(cmd)) return_ECMD_FAILED; for (i = 0; i < argc; i++) {