a84bdf6a10
If rte_metrics_init() had not been called and hence the internal metric storage is not allocated, rte_metrics_get_values() and rte_metrics_get_name() would silently fail by returning zero (i.e. no metrics registered). This patch changes the result of this scenario to an explicit fail by returning -EIO. Fixes: 349950ddb9c5 ("metrics: add information metrics library") Cc: stable@dpdk.org Signed-off-by: Remy Horton <remy.horton@intel.com>