examples/ioat: fix invalid link status check
authorCiara Power <ciara.power@intel.com>
Fri, 7 Feb 2020 10:24:02 +0000 (10:24 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 13 Feb 2020 13:43:56 +0000 (14:43 +0100)
The return value of the get link function call was not checked, and
could return a negative value indicating a failure. This meant the
link_status of the link being checked is invalid, because the link was
not filled with data. The return value is now checked, and if the return
value is not 0 for success, the loop continues with the next port.

To avoid confusion between variable names, the existing retval variable
is renamed to link_status, to better represent its use.

Coverity issue: 350348
Fixes: c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

No differences found