net/virtio: fix PCI config error handling
net/virtio: fix PCI config error handling

In virtio_read_caps and vtpci_msix_detect, rte_pci_read_config returns
the number of bytes read from PCI config or < 0 on error.
If less than the expected number of bytes are read then log the
failure and return rather than carrying on with garbage.

Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0")
Cc: stable@dpdk.org

Signed-off-by: Brian Russell <c0fd84b3bbda19994baa9daf2ffca6aee56ddad4@brocade.com>
Signed-off-by: Luca Boccassi <020748dc039465edc3ee6f30c530b21164cdce27@debian.org>
Reviewed-by: Tiwei Bie <f338cf29d7d69ff1bc99f755ebfb0eb0accd409e@intel.com>

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