From 2a1c4302d1e6a6d34084989a0ef7e57e6f5a29a4 Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Thu, 25 Oct 2018 10:41:27 +0200 Subject: nb/intel/i945: Remove irrelevant conditional statement After a {break,return}, "else" is generally not needed. Change-Id: Id55af179f63316f7218e93978628cbe05e94e0aa Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/29266 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/northbridge/intel/i945/gma.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/northbridge') diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c index 83dc42ef99..749d07b724 100644 --- a/src/northbridge/intel/i945/gma.c +++ b/src/northbridge/intel/i945/gma.c @@ -588,16 +588,15 @@ static u32 get_cdclk(struct device *const dev) { u16 gcfgc = pci_read_config16(dev, GCFGC); - if (gcfgc & GC_LOW_FREQUENCY_ENABLE) { + if (gcfgc & GC_LOW_FREQUENCY_ENABLE) return 133333333; - } else { - switch (gcfgc & GC_DISPLAY_CLOCK_MASK) { - case GC_DISPLAY_CLOCK_333_320_MHZ: - return 320000000; - default: - case GC_DISPLAY_CLOCK_190_200_MHZ: - return 200000000; - } + + switch (gcfgc & GC_DISPLAY_CLOCK_MASK) { + case GC_DISPLAY_CLOCK_333_320_MHZ: + return 320000000; + default: + case GC_DISPLAY_CLOCK_190_200_MHZ: + return 200000000; } } -- cgit v1.2.3