summaryrefslogtreecommitdiff
path: root/drivers/net/qede/qede_rxtx.c
diff options
context:
space:
mode:
authorOlivier Matz <olivier.matz@6wind.com>2017-09-11 17:13:25 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2017-10-06 02:49:50 +0200
commitf4b7699c88f74aeb9983aa7ef438f8e7e72eb8c5 (patch)
tree104c425918884cc1a2674e047bb9e686a7939fa7 /drivers/net/qede/qede_rxtx.c
parent4a671fdea9f41ecb0a6113b66d21a8eed5ac06ec (diff)
downloaddpdk-f4b7699c88f74aeb9983aa7ef438f8e7e72eb8c5.zip
dpdk-f4b7699c88f74aeb9983aa7ef438f8e7e72eb8c5.tar.gz
dpdk-f4b7699c88f74aeb9983aa7ef438f8e7e72eb8c5.tar.xz
net/qede: fix compilation with -Og
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following error: CC qede_rxtx.o qede_rxtx.c: In function ‘qede_start_queues’: qede_rxtx.c:797:9: error: ‘rc’ may be used uninitialized in this function [-Werror=maybe-uninitialized] return rc; ^~ If there is no Rx or Tx queue, rc will not be initialized. Fix it by initializing rc to -1. Fixes: 4c4bdadfa9e7 ("net/qede: refactoring multi-queue implementation") Cc: stable@dpdk.org Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Harish Patil <harish.patil@cavium.com>
Diffstat (limited to 'drivers/net/qede/qede_rxtx.c')
-rw-r--r--drivers/net/qede/qede_rxtx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 89ad113..45b4aeb 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -780,7 +780,7 @@ int qede_start_queues(struct rte_eth_dev *eth_dev)
{
struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
uint8_t id;
- int rc;
+ int rc = -1;
for_each_rss(id) {
rc = qede_rx_queue_start(eth_dev, id);