From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 5FEEA1B130; Tue, 23 Apr 2019 17:43:24 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Apr 2019 08:43:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,386,1549958400"; d="scan'208";a="164316558" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.212]) by fmsmga004.fm.intel.com with ESMTP; 23 Apr 2019 08:43:22 -0700 From: Ferruh Yigit To: dev@dpdk.org Cc: stable@dpdk.org Date: Tue, 23 Apr 2019 16:43:19 +0100 Message-Id: <20190423154319.86979-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/kni: fix return value check 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: , X-List-Received-Date: Tue, 23 Apr 2019 15:43:24 -0000 'rte_kni_release()' return value is not checked, adding it. Coverity issue: 336837 Fixes: 75e2bc54c018 ("net/kni: add KNI PMD") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- drivers/net/kni/rte_eth_kni.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index 89f44737c..1f232e4da 100644 --- a/drivers/net/kni/rte_eth_kni.c +++ b/drivers/net/kni/rte_eth_kni.c @@ -459,6 +459,7 @@ eth_kni_remove(struct rte_vdev_device *vdev) struct rte_eth_dev *eth_dev; struct pmd_internals *internals; const char *name; + int ret; name = rte_vdev_device_name(vdev); PMD_LOG(INFO, "Un-Initializing eth_kni for %s", name); @@ -477,7 +478,9 @@ eth_kni_remove(struct rte_vdev_device *vdev) eth_kni_dev_stop(eth_dev); internals = eth_dev->data->dev_private; - rte_kni_release(internals->kni); + ret = rte_kni_release(internals->kni); + if (ret) + PMD_LOG(WARNING, "Not able to release kni for %s", name); rte_eth_dev_release_port(eth_dev); -- 2.20.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 68331A05D3 for ; Tue, 23 Apr 2019 17:43:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 269DE1B1EF; Tue, 23 Apr 2019 17:43:26 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 5FEEA1B130; Tue, 23 Apr 2019 17:43:24 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Apr 2019 08:43:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,386,1549958400"; d="scan'208";a="164316558" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.212]) by fmsmga004.fm.intel.com with ESMTP; 23 Apr 2019 08:43:22 -0700 From: Ferruh Yigit To: dev@dpdk.org Cc: stable@dpdk.org Date: Tue, 23 Apr 2019 16:43:19 +0100 Message-Id: <20190423154319.86979-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/kni: fix return value check 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" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190423154319.tyDY9Scv-RvhvpUceo2Utpa6DkQu787oooPp2jNlTOw@z> 'rte_kni_release()' return value is not checked, adding it. Coverity issue: 336837 Fixes: 75e2bc54c018 ("net/kni: add KNI PMD") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- drivers/net/kni/rte_eth_kni.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index 89f44737c..1f232e4da 100644 --- a/drivers/net/kni/rte_eth_kni.c +++ b/drivers/net/kni/rte_eth_kni.c @@ -459,6 +459,7 @@ eth_kni_remove(struct rte_vdev_device *vdev) struct rte_eth_dev *eth_dev; struct pmd_internals *internals; const char *name; + int ret; name = rte_vdev_device_name(vdev); PMD_LOG(INFO, "Un-Initializing eth_kni for %s", name); @@ -477,7 +478,9 @@ eth_kni_remove(struct rte_vdev_device *vdev) eth_kni_dev_stop(eth_dev); internals = eth_dev->data->dev_private; - rte_kni_release(internals->kni); + ret = rte_kni_release(internals->kni); + if (ret) + PMD_LOG(WARNING, "Not able to release kni for %s", name); rte_eth_dev_release_port(eth_dev); -- 2.20.1