[v1,08/24] net/igc/base: fix unused value
Checks
Commit Message
From: Dima Ruinskiy <dima.ruinskiy@intel.com>
Static analysis has reported that when there is no get link status callback
function, the value set in the if condition is not used and gets
overwritten in the "out" section of the code. Fix by not seting the
variable.
Fixes: 8cb7c57d9b3c ("net/igc: support device initialization")
Cc: stable@dpdk.org
Signed-off-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/intel/igc/base/igc_i225.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
@@ -1114,10 +1114,8 @@ s32 igc_check_for_link_i225(struct igc_hw *hw)
* changed. The get_link_status flag is set upon receiving
* a Link Status Change or Rx Sequence Error interrupt.
*/
- if (!mac->get_link_status) {
- ret_val = IGC_SUCCESS;
+ if (!mac->get_link_status)
goto out;
- }
/* First we want to see if the MII Status Register reports
* link. If so, then we want to get the current speed/duplex