Hi Michael,

Title should be " examples/fips_validation: fix bad return value "

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

Please add a fixes line here and cc stable.

It would be good if you can separate out the fixes from this patchset which add 
some functionality.

-Akhil

> 
> Signed-off-by: Michael Shamis <michae...@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 fe3bcc386..91e6d48e7 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 via email to