From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 15 Jul 2015 10:22:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,481,1432623600"; d="scan'208";a="729503168" Received: from lwang14-mobl6.amr.corp.intel.com ([10.127.189.1]) by orsmga001.jf.intel.com with ESMTP; 15 Jul 2015 10:22:51 -0700 From: Liang-Min Larry Wang To: dev@dpdk.org Date: Wed, 15 Jul 2015 13:22:40 -0400 Message-Id: <1436980960-16028-1-git-send-email-liang-min.wang@intel.com> X-Mailer: git-send-email 2.1.4 Cc: Liang-Min Larry Wang Subject: [dpdk-dev] [PATCH] ethdev: fix macro VALID_PORTID_OR_ERR_RTE X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2015 17:23:01 -0000 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