]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/gdsys/405ep/iocon.c
board: iocon: Fix uninitialized access
[karo-tx-uboot.git] / board / gdsys / 405ep / iocon.c
index fffed7390b427c3d8cbfe99945cf9389fea0a743..1d7e14119d6fa4722076f3d48b7c022faa28e768 100644 (file)
@@ -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 */