Comments
Patch
From 64d62f5afb973d42cfdbe8d35f0b11885e525ef9 Mon Sep 17 00:00:00 2001
From: Tadas Slotkus <devtadas@gmail.com>
Date: Mon, 22 Aug 2011 16:29:37 +0300
Subject: [carFl mem 65/65] Kill exit() in enable_flash_ich_dc
Replace it by newly created return mechanism.
This patch is proposed for mainline:
http://www.flashrom.org/pipermail/flashrom/2011-August/007691.html
Signed-off-by: Tadas Slotkus <devtadas@gmail.com>
---
chipset_enable.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
@@ -342,10 +342,7 @@ static int enable_flash_ich_dc(globals *g, 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);
@@ -467,6 +464,8 @@ static int enable_flash_ich_dc_spi(globals *g, struct pci_dev *dev, const char *
/* Enable Flash Writes */
ret = enable_flash_ich_dc(g, 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