[flashrom] [PATCH 2/2] Kill exit() in enable_flash_ich_dc
Tadas Slotkus
devtadas at gmail.com
Mon Aug 22 00:26:38 CEST 2011
Replace it by newly created return mechanism.
Signed-off-by: Tadas Slotkus <devtadas at gmail.com>
---
chipset_enable.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/chipset_enable.c b/chipset_enable.c
index ee005af..ca4f245 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -343,10 +343,7 @@ static int enable_flash_ich_dc(struct pci_dev *dev, const char *name)
msg_perr("Error: fwh_idsel= specified, but no value given.\n");
idsel_garbage_out:
free(idsel);
- /* FIXME: Return failure here once internal_init() starts
- * to care about the return value of the chipset enable.
- */
- exit(1);
+ return ERROR_FATAL;
}
free(idsel);
@@ -468,6 +465,8 @@ static int enable_flash_ich_dc_spi(struct pci_dev *dev, const char *name,
/* Enable Flash Writes */
ret = enable_flash_ich_dc(dev, name);
+ if (ret == ERROR_FATAL)
+ return ret;
/* Get physical address of Root Complex Register Block */
tmp = pci_read_long(dev, 0xf0) & 0xffffc000;
--
1.7.6
More information about the flashrom
mailing list