From patchwork Wed May 13 20:22:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh Bhagavatula X-Patchwork-Id: 70198 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CB865A00C5; Wed, 13 May 2020 22:22:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9DD021D629; Wed, 13 May 2020 22:22:58 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 4470B1D629; Wed, 13 May 2020 22:22:57 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 04DKG2f6007885; Wed, 13 May 2020 13:22:56 -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=tlOVV0/2wZQE0cifHYhaZXYrG4io2vURbnGiB+uxwnw=; b=DzwB7gbvpCo1v2fxYoylyNGNfLyco5BsH3esPq1Q99Vosu5CE+2yKpVzM1Y54DxjASJq k7MYHUKWiYc6FkJ5N7EeeFeGo3asQ9azjAofYdQLxTKVllyAkoBw+eiJACgqGd5f1eNi 3qbZaEWE8vEiYIp/6od5jShWo82kp5IHpRgzxgVWzho8oX7+IAQ1itZTbDfEzc/a76jb MVwIyJslUaTEa4Rdxia2PWBmu1/DTC1ag8hrYRnsOaFfrZfHWNlvDS8Pe8RvnnkxjpPr 45TtLp6QkS9c5OdrlWBASVRAfARq3JbsjKFY0S0gOLJ+N3aZM5guH4NpRaVUDW0HC/1f oQ== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 3100xjxjx4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 13 May 2020 13:22:56 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 13 May 2020 13:22:54 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 13 May 2020 13:22:54 -0700 Received: from BG-LT7430.marvell.com (BG-LT7430.marvell.com [10.28.161.240]) by maili.marvell.com (Postfix) with ESMTP id 1C2143F703F; Wed, 13 May 2020 13:22:52 -0700 (PDT) From: To: CC: , Pavan Nikhilesh , Date: Thu, 14 May 2020 01:52:48 +0530 Message-ID: <20200513202249.6295-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-13_09:2020-05-13, 2020-05-13 signatures=0 Subject: [dpdk-dev] [PATCH] app/eventdev: fix unchecked function return values X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Pavan Nikhilesh Fix unchecked return values reported by coverity. Coverity issue: 357755 Fixes: 032a965a8f1d ("app/eventdev: support Tx adapter") Cc: stable@dpdk.org Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- app/test-eventdev/test_pipeline_common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c index 84c42b33c..f1c227941 100644 --- a/app/test-eventdev/test_pipeline_common.c +++ b/app/test-eventdev/test_pipeline_common.c @@ -392,8 +392,12 @@ pipeline_event_tx_adapter_setup(struct evt_options *opt, if (!(cap & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) { uint32_t service_id = -1U; - rte_event_eth_tx_adapter_service_id_get(consm, - &service_id); + ret = rte_event_eth_tx_adapter_service_id_get(consm, + &service_id); + if (ret != -ESRCH && ret != 0) { + evt_err("Failed to get Tx adptr service ID\n"); + return ret; + } ret = evt_service_setup(service_id); if (ret) { evt_err("Failed to setup service core"