diff mbox series

[v2] net/e1000: fix write NVM srwr alwayes return success

Message ID 1618989055-7236-1-git-send-email-humin29@huawei.com (mailing list archive)
State Not Applicable, archived
Delegated to: Qi Zhang
Headers show
Series [v2] net/e1000: fix write NVM srwr alwayes return success | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Min Hu (Connor) April 21, 2021, 7:10 a.m. UTC
From: Chengwen Feng <fengchengwen@huawei.com>

This patch fixes e1000_write_nvm_srwr() alwayes return success.

Fixes: 5a32a257f957 ("e1000: more NICs in base driver")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
v2:
* change 'E1000_ERR_NVM' to '-E1000_ERR_NVM'.
---
 drivers/net/e1000/base/e1000_i210.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/e1000/base/e1000_i210.c b/drivers/net/e1000/base/e1000_i210.c
index 3c349d3..615e7c9 100644
--- a/drivers/net/e1000/base/e1000_i210.c
+++ b/drivers/net/e1000/base/e1000_i210.c
@@ -310,6 +310,8 @@  STATIC s32 e1000_write_nvm_srwr(struct e1000_hw *hw, u16 offset, u16 words,
 	}
 
 	for (i = 0; i < words; i++) {
+		ret_val = E1000_ERR_NVM;
+
 		eewr = ((offset + i) << E1000_NVM_RW_ADDR_SHIFT) |
 			(data[i] << E1000_NVM_RW_REG_DATA) |
 			E1000_NVM_RW_REG_START;