[dpdk-dev,v2,22/29] net/mlx4: fix invalid errno value sign

Message ID 44637d57aa92dc8ac82999e3ba3f8d6a5530f1ce.1507809961.git.adrien.mazarguil@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply patch file failure

Commit Message

Adrien Mazarguil Oct. 12, 2017, 12:19 p.m. UTC
  Tx queue elements allocation function sets rte_errno properly and returns
its negative version. Reassigning this value to rte_errno is thus both
invalid and unnecessary.

Fixes: c3e1f93cdf88 ("net/mlx4: standardize on negative errno values")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx4/mlx4_txq.c | 1 -
 1 file changed, 1 deletion(-)
  

Patch

diff --git a/drivers/net/mlx4/mlx4_txq.c b/drivers/net/mlx4/mlx4_txq.c
index c1fdbaf..3cece3e 100644
--- a/drivers/net/mlx4/mlx4_txq.c
+++ b/drivers/net/mlx4/mlx4_txq.c
@@ -340,7 +340,6 @@  mlx4_txq_setup(struct rte_eth_dev *dev, struct txq *txq, uint16_t desc,
 	}
 	ret = mlx4_txq_alloc_elts(&tmpl, desc);
 	if (ret) {
-		rte_errno = ret;
 		ERROR("%p: TXQ allocation failed: %s",
 		      (void *)dev, strerror(rte_errno));
 		goto error;