summaryrefslogtreecommitdiff
path: root/board/gdsys
diff options
context:
space:
mode:
authorDirk Eibach <dirk.eibach@gdsys.cc>2014-11-13 19:21:17 +0100
committerStefan Roese <sr@denx.de>2014-11-19 08:48:41 +0100
commita8cb9d0b17af9d7b3ad205cf83fbfd47528fa9d0 (patch)
tree261bc7599a90baa779c4130a0f162e4a0edd555a /board/gdsys
parent8272baa964580da299391398dc3e286d904a9f56 (diff)
board: iocon: Fix uninitialized access
Wolfgang Denk found this issue using cppcheck: (error) Uninitialized variable: fpga_features Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/gdsys')
-rw-r--r--board/gdsys/405ep/iocon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/board/gdsys/405ep/iocon.c b/board/gdsys/405ep/iocon.c
index fffed7390b4..1d7e14119d6 100644
--- a/board/gdsys/405ep/iocon.c
+++ b/board/gdsys/405ep/iocon.c
@@ -369,10 +369,11 @@ int last_stage_init(void)
unsigned char mclink_controllers[] = { 0x24, 0x25, 0x26 };
int legacy = get_fpga_state(0) & FPGA_STATE_PLATFORM;
u16 fpga_features;
- int feature_carrier_speed = fpga_features & (1<<4);
+ int feature_carrier_speed;
bool ch0_rgmii2_present = false;
FPGA_GET_REG(0, fpga_features, &fpga_features);
+ feature_carrier_speed = fpga_features & (1<<4);
if (!legacy) {
/* Turn on Parade DP501 */