summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorVarad Gautam <varadgautam@gmail.com>2015-03-11 09:54:41 +0530
committerMarc Jones <marc.jones@se-eng.com>2015-04-06 19:40:00 +0200
commit06ef04604570d402687245521731053c66888b15 (patch)
treece0fd5b994094f7228d7c18245f8758fd48676ee /src/northbridge
parent015f0aea5dc0cd391ddc34c1db6591d93d08e8a9 (diff)
downloadcoreboot-06ef04604570d402687245521731053c66888b15.tar.xz
global: Refactor get_option usage
Restructure get_option() calls to avoid unnecessary return value checks by pre-assigning defaults to the options being retrieved. Change-Id: I9159afe149a8eeed0785d1efd6eee8420b88b8f4 Signed-off-by: Varad Gautam <varadgautam@gmail.com> Reviewed-on: http://review.coreboot.org/8631 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/amd/amdk8/misc_control.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/northbridge/amd/amdk8/misc_control.c b/src/northbridge/amd/amdk8/misc_control.c
index 956692dd5e..9b521eef79 100644
--- a/src/northbridge/amd/amdk8/misc_control.c
+++ b/src/northbridge/amd/amdk8/misc_control.c
@@ -47,9 +47,8 @@ static void mcf3_read_resources(device_t dev)
return;
}
- iommu = 1;
- if (get_option(&iommu, "iommu") != CB_SUCCESS)
- iommu = CONFIG_IOMMU;
+ iommu = CONFIG_IOMMU;
+ get_option(&iommu, "iommu");
if (iommu) {
/* Add a GART aperture resource */