Skip to content
Snippets Groups Projects
Commit a8cb9d0b authored by Dirk Eibach's avatar Dirk Eibach Committed by Stefan Roese
Browse files

board: iocon: Fix uninitialized access


Wolfgang Denk found this issue using cppcheck:
(error) Uninitialized variable: fpga_features

Signed-off-by: default avatarDirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: default avatarStefan Roese <sr@denx.de>
parent 8272baa9
No related branches found
No related tags found
No related merge requests found
...@@ -369,10 +369,11 @@ int last_stage_init(void) ...@@ -369,10 +369,11 @@ int last_stage_init(void)
unsigned char mclink_controllers[] = { 0x24, 0x25, 0x26 }; unsigned char mclink_controllers[] = { 0x24, 0x25, 0x26 };
int legacy = get_fpga_state(0) & FPGA_STATE_PLATFORM; int legacy = get_fpga_state(0) & FPGA_STATE_PLATFORM;
u16 fpga_features; u16 fpga_features;
int feature_carrier_speed = fpga_features & (1<<4); int feature_carrier_speed;
bool ch0_rgmii2_present = false; bool ch0_rgmii2_present = false;
FPGA_GET_REG(0, fpga_features, &fpga_features); FPGA_GET_REG(0, fpga_features, &fpga_features);
feature_carrier_speed = fpga_features & (1<<4);
if (!legacy) { if (!legacy) {
/* Turn on Parade DP501 */ /* Turn on Parade DP501 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment