Caught by code review.

If dpdk_eth_dev_init() fails, no need to continue and try to initialise
other features for this port.
Plus, err may get overwritten later (like if some rss steering is
configured) which could result in non consistent error codes.

Signed-off-by: David Marchand <[email protected]>
---
 lib/netdev-dpdk.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index e454a4a5d3..b549549470 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -6158,6 +6158,9 @@ retry:
     }
 
     err = dpdk_eth_dev_init(dev);
+    if (err) {
+        goto out;
+    }
     netdev_dpdk_update_netdev_flags(dev);
 
     /* If both requested and actual hwaddr were previously
-- 
2.47.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to