From 2382a607599ec1e44594bd74175fc8ffcc260a47 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Tue, 16 Mar 2021 12:21:36 +0530 Subject: [PATCH] app/testpmd: check MAC address query This patch checks return value for rte_eth_dev_info_get() in show_macs(). Coverity issue: 353629 Fixes: e1d44d0ad623 ("app/testpmd: show MAC addresses added to a port") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Acked-by: Xiaoyun Li Acked-by: Andrew Rybchenko --- app/test-pmd/config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 576d5acab5..4ce75a8e73 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -4930,7 +4930,8 @@ show_macs(portid_t port_id) dev = &rte_eth_devices[port_id]; - rte_eth_dev_info_get(port_id, &dev_info); + if (eth_dev_info_get_print_err(port_id, &dev_info)) + return; for (i = 0; i < dev_info.max_mac_addrs; i++) { addr = &dev->data->mac_addrs[i]; -- 2.20.1