aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nicintel_eeprom.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/nicintel_eeprom.c b/nicintel_eeprom.c
index 42e6a7bb..6827d9a2 100644
--- a/nicintel_eeprom.c
+++ b/nicintel_eeprom.c
@@ -397,8 +397,10 @@ static int nicintel_ee_erase_82580(struct flashctx *flash, unsigned int addr, un
static int nicintel_ee_shutdown_i210(void *arg)
{
+ int ret = 0;
+
if (!done_i20_write)
- return 0;
+ goto out;
uint32_t flup = pci_mmio_readl(nicintel_eebar + EEC);
@@ -408,11 +410,13 @@ static int nicintel_ee_shutdown_i210(void *arg)
int i;
for (i = 0; i < MAX_ATTEMPTS; i++)
if (pci_mmio_readl(nicintel_eebar + EEC) & BIT(EE_FLUDONE))
- return 0;
+ goto out;
+ ret = -1;
msg_perr("Flash update failed\n");
- return -1;
+out:
+ return ret;
}
static int nicintel_ee_shutdown_82580(void *eecp)