metrics: do not fail silently when uninitialised
metrics: do not fail silently when uninitialised

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 <34c343e92f0e27f7a8e26a1d8d2146ae7c7dd1a3@intel.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk