From 06ef04604570d402687245521731053c66888b15 Mon Sep 17 00:00:00 2001 From: Varad Gautam Date: Wed, 11 Mar 2015 09:54:41 +0530 Subject: 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 Reviewed-on: http://review.coreboot.org/8631 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi Reviewed-by: Marc Jones --- src/northbridge/amd/amdk8/misc_control.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/northbridge/amd/amdk8') 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 */ -- cgit v1.2.3