Commit a8cb9d0b17af9d7b3ad205cf83fbfd47528fa9d0
Committed by
Stefan Roese
1 parent
8272baa964
Exists in
v2017.01-smarct4x
and in
37 other branches
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>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
board/gdsys/405ep/iocon.c
... | ... | @@ -369,10 +369,11 @@ |
369 | 369 | unsigned char mclink_controllers[] = { 0x24, 0x25, 0x26 }; |
370 | 370 | int legacy = get_fpga_state(0) & FPGA_STATE_PLATFORM; |
371 | 371 | u16 fpga_features; |
372 | - int feature_carrier_speed = fpga_features & (1<<4); | |
372 | + int feature_carrier_speed; | |
373 | 373 | bool ch0_rgmii2_present = false; |
374 | 374 | |
375 | 375 | FPGA_GET_REG(0, fpga_features, &fpga_features); |
376 | + feature_carrier_speed = fpga_features & (1<<4); | |
376 | 377 | |
377 | 378 | if (!legacy) { |
378 | 379 | /* Turn on Parade DP501 */ |