From mboxrd@z Thu Jan 1 00:00:00 1970 From: Liang-Min Larry Wang Subject: [PATCH] ethdev: fix macro VALID_PORTID_OR_ERR_RTE Date: Wed, 15 Jul 2015 13:22:40 -0400 Message-ID: <1436980960-16028-1-git-send-email-liang-min.wang@intel.com> Cc: Liang-Min Larry Wang To: dev@dpdk.org Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 7837F5947 for ; Wed, 15 Jul 2015 19:23:01 +0200 (CEST) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" fix return value, using the macro input instead of -EINVAL. Signed-off-by: Liang-Min Larry Wang --- lib/librte_ether/rte_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index ddf3658..a957d9a 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -111,7 +111,7 @@ #define VALID_PORTID_OR_ERR_RET(port_id, retval) do { \ if (!rte_eth_dev_is_valid_port(port_id)) { \ PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id); \ - return -EINVAL; \ + return retval; \ } \ } while (0) -- 2.1.0