patches for DPDK stable branches
 help / color / mirror / Atom feed
From: <michaelsh@marvell.com>
To: <akhil.goyal@nxp.com>
Cc: <marko.kovacevic@intel.com>, <stable@dpdk.org>,
	<lironh@marvell.com>, <michaelsh@marvell.com>
Subject: [dpdk-stable] [PATCH] examples/fips_validation: fix bad return value
Date: Mon, 16 Sep 2019 13:04:42 +0300	[thread overview]
Message-ID: <20190916100442.12140-1-michaelsh@marvell.com> (raw)

From: Michael Shamis <michaelsh@marvell.com>

Returning correct error value by fips_test_parse_header()
allows graceful exit of fips application.

Signed-off-by: Michael Shamis <michaelsh@marvell.com>
---
 examples/fips_validation/fips_validation.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
index 80fd482a1..eaa7349d6 100644
--- a/examples/fips_validation/fips_validation.c
+++ b/examples/fips_validation/fips_validation.c
@@ -125,13 +125,13 @@ fips_test_parse_header(void)
 				info.algo = FIPS_TEST_ALGO_AES_CMAC;
 				ret = parse_test_cmac_init();
 				if (ret < 0)
-					return 0;
+					return ret;
 			} else if (strstr(info.vec[i], "CCM")) {
 				algo_parsed = 1;
 				info.algo = FIPS_TEST_ALGO_AES_CCM;
 				ret = parse_test_ccm_init();
 				if (ret < 0)
-					return 0;
+					return ret;
 			} else if (strstr(info.vec[i], "HMAC")) {
 				algo_parsed = 1;
 				info.algo = FIPS_TEST_ALGO_HMAC;
@@ -143,7 +143,7 @@ fips_test_parse_header(void)
 				info.algo = FIPS_TEST_ALGO_TDES;
 				ret = parse_test_tdes_init();
 				if (ret < 0)
-					return 0;
+					return ret;
 			} else if (strstr(info.vec[i], "SHA-")) {
 				if (info.algo != FIPS_TEST_ALGO_HMAC) {
 					algo_parsed = 1;
-- 
2.23.0


             reply	other threads:[~2019-09-16  9:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-16 10:04 michaelsh [this message]
2019-09-16  9:48 ` Akhil Goyal
2019-09-16 16:37 michaelsh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190916100442.12140-1-michaelsh@marvell.com \
    --to=michaelsh@marvell.com \
    --cc=akhil.goyal@nxp.com \
    --cc=lironh@marvell.com \
    --cc=marko.kovacevic@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).