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>
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;
}