From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D72A2A2EFC for ; Mon, 16 Sep 2019 11:46:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A4E851BFF3; Mon, 16 Sep 2019 11:46:20 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 2623C1BFF3 for ; Mon, 16 Sep 2019 11:46:18 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x8G9jA3e032391; Mon, 16 Sep 2019 02:46:18 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=s43kULBXYIV7P9z4WR7nqLp0d8IG07zlsctuK9IQXqs=; b=er21k18M7639u4PYV6Ci2yFdxkBrndyg6qqX8GNQhz/KxEpDcCR6+jGOBcpDFjSO6M1E YjlOP+Tn+bkOCsHWq5H7KLigf49FQ46JB/9siGsDvf5hnObwgRvGPlEYV3YuYljaeJup cA/r/MxEw/PwvJ5Nm9OlBNG4H9fKaYO2TvlKvTZbFtfYMsl10NlxaJMAmepYVV2DnM6b VwHWi/RVlbYp91CUf4r9kfCJfWbGZwU966Nbaptzl8euHCMQms5TmiNHuuBWjx0wID/S Omnh2KtbPrVhBg+xv6VDjXxt9cZmM1nhRzEJ2hHJEB/6LjZcW8JEaCYi1n97ektMH/qN MQ== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2v0wjpehxs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 16 Sep 2019 02:46:18 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 16 Sep 2019 02:46:16 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 16 Sep 2019 02:46:16 -0700 Received: from vvenus375.il.marvell.com (unknown [10.5.120.75]) by maili.marvell.com (Postfix) with ESMTP id 740073F703F; Mon, 16 Sep 2019 02:46:15 -0700 (PDT) From: To: CC: , , , Date: Mon, 16 Sep 2019 13:04:42 +0300 Message-ID: <20190916100442.12140-1-michaelsh@marvell.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.70,1.0.8 definitions=2019-09-16_05:2019-09-11,2019-09-16 signatures=0 Subject: [dpdk-stable] [PATCH] examples/fips_validation: fix bad return value X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Michael Shamis Returning correct error value by fips_test_parse_header() allows graceful exit of fips application. Signed-off-by: Michael Shamis --- 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