net/avf: fix unchecked return in link update

This patch fixes the coverity CHECKED_RETURN issue.

Coverity issue: 257045
Fixes: 48de41ca11f0 ("net/avf: enable link status update")

Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
This commit is contained in:
Jingjing Wu 2018-01-30 17:10:36 +08:00 committed by Ferruh Yigit
parent 4bc5ab88db
commit 29bc629498

View File

@ -611,9 +611,10 @@ avf_dev_link_update(struct rte_eth_dev *dev,
new_link.link_autoneg = !!(dev->data->dev_conf.link_speeds &
ETH_LINK_SPEED_FIXED);
rte_atomic64_cmpset((uint64_t *)&dev->data->dev_link,
*(uint64_t *)&dev->data->dev_link,
*(uint64_t *)&new_link);
if (rte_atomic64_cmpset((uint64_t *)&dev->data->dev_link,
*(uint64_t *)&dev->data->dev_link,
*(uint64_t *)&new_link) == 0)
return -1;
return 0;
}