[PATCH v1 39/42] net/e1000/base: fix unchecked return

Anatoly Burakov anatoly.burakov at intel.com
Fri Jan 31 13:58:52 CET 2025


From: Dima Ruinskiy <dima.ruinskiy at intel.com>

Static analysis has detected a write that is not checked for errors,
leading to ignored error return value. Add a check.

Fixes: edcdb3c5f71b ("e1000/base: fix link flap on 82579")
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/e1000/base/e1000_ich8lan.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/intel/e1000/base/e1000_ich8lan.c b/drivers/net/intel/e1000/base/e1000_ich8lan.c
index c3449a3f45..6b7eb245a6 100644
--- a/drivers/net/intel/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/intel/e1000/base/e1000_ich8lan.c
@@ -989,6 +989,8 @@ s32 e1000_set_eee_pchlan(struct e1000_hw *hw)
 		data &= ~I82579_LPI_100_PLL_SHUT;
 		ret_val = e1000_write_emi_reg_locked(hw, I82579_LPI_PLL_SHUT,
 						     data);
+		if (ret_val)
+			goto release;
 	}
 
 	/* R/Clr IEEE MMD 3.1 bits 11:10 - Tx/Rx LPI Received */
-- 
2.43.5



More information about the dev mailing list