[dpdk-stable] [PATCH] examples/fips_validation: fix bad return value

Akhil Goyal akhil.goyal at nxp.com
Mon Sep 16 11:48:48 CEST 2019



> 
> From: Michael Shamis <michaelsh at marvell.com>
> 
> Returning correct error value by fips_test_parse_header()
> allows graceful exit of fips application.
> 
Please add a fixes line here about which commit it is fixing.
Please take http://patches.dpdk.org/patch/59101/ as reference.

> Signed-off-by: Michael Shamis <michaelsh at 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



More information about the stable mailing list