[PATCH v1 08/24] net/igc/base: fix unused value
Anatoly Burakov
anatoly.burakov at intel.com
Thu Feb 6 17:08:31 CET 2025
From: Dima Ruinskiy <dima.ruinskiy at 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 at dpdk.org
Signed-off-by: Dima Ruinskiy <dima.ruinskiy at intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
drivers/net/intel/igc/base/igc_i225.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/intel/igc/base/igc_i225.c b/drivers/net/intel/igc/base/igc_i225.c
index c7c2ec8ffe..23c68a3948 100644
--- a/drivers/net/intel/igc/base/igc_i225.c
+++ b/drivers/net/intel/igc/base/igc_i225.c
@@ -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
--
2.43.5
More information about the dev
mailing list