aboutsummaryrefslogtreecommitdiff
path: root/src/southbridge
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2014-09-29 19:40:51 +0200
committerPatrick Georgi <pgeorgi@google.com>2014-10-18 14:45:47 +0200
commit1ab4495204b5bfe145edb5f1d0cac0a7017d79f0 (patch)
tree5db57ed9d02fb4647ac74f106c2409bae581d22b /src/southbridge
parent667c7a3b23e154254a4b91286cbb0f6aedf4c410 (diff)
intel/i82801bx: Minor log fixes in IDE driver
Two issues: 1. without config, there were two NULL derefs 2. output for "Secondary" looked at ide0_enable Change-Id: I34ddbc0f9b27226981ccbc237e3d59e522076d55 Found-by: Coverity Scan Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/6989 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/southbridge')
-rw-r--r--src/southbridge/intel/i82801bx/ide.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/southbridge/intel/i82801bx/ide.c b/src/southbridge/intel/i82801bx/ide.c
index e24e6939e4..7ce18f1e22 100644
--- a/src/southbridge/intel/i82801bx/ide.c
+++ b/src/southbridge/intel/i82801bx/ide.c
@@ -39,7 +39,7 @@ static void ide_init(struct device *dev)
if (!conf || conf->ide0_enable)
reg16 |= IDE_DECODE_ENABLE;
printk(BIOS_DEBUG, "IDE: %s IDE interface: %s\n", "Primary",
- conf->ide0_enable ? "on" : "off");
+ (reg16 & IDE_DECODE_ENABLE) ? "on" : "off");
pci_write_config16(dev, IDE_TIM_PRI, reg16);
reg16 = pci_read_config16(dev, IDE_TIM_SEC);
@@ -47,7 +47,7 @@ static void ide_init(struct device *dev)
if (!conf || conf->ide1_enable)
reg16 |= IDE_DECODE_ENABLE;
printk(BIOS_DEBUG, "IDE: %s IDE interface: %s\n", "Secondary",
- conf->ide0_enable ? "on" : "off");
+ (reg16 & IDE_DECODE_ENABLE) ? "on" : "off");
pci_write_config16(dev, IDE_TIM_SEC, reg16);
}