summaryrefslogtreecommitdiffstats
path: root/chipset_enable.c
diff options
context:
space:
mode:
Diffstat (limited to 'chipset_enable.c')
-rw-r--r--chipset_enable.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/chipset_enable.c b/chipset_enable.c
index 15bd3eb..77e0862 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -491,7 +491,7 @@ static int enable_flash_vt8237s_spi(struct pci_dev *dev, const char *name)
static int enable_flash_ich_dc_spi(struct pci_dev *dev, const char *name,
enum ich_chipset ich_generation)
{
- int ret;
+ int ret, ret_spi;
uint8_t bbs, buc;
uint32_t tmp, gcs;
void *rcrb;
@@ -569,10 +569,12 @@ static int enable_flash_ich_dc_spi(struct pci_dev *dev, const char *name,
}
/* This adds BUS_SPI */
- if (ich_init_spi(dev, tmp, rcrb, ich_generation) != 0) {
- if (!ret)
- ret = ERROR_NONFATAL;
- }
+ ret_spi = ich_init_spi(dev, tmp, rcrb, ich_generation);
+ if (ret_spi == ERROR_FATAL)
+ return ret_spi;
+
+ if (ret || ret_spi)
+ ret = ERROR_NONFATAL;
return ret;
}
OpenPOWER on IntegriCloud