Skip to content

Commit

Permalink
When a USB error occurs, chip-id does not appear to be initialized.
Browse files Browse the repository at this point in the history
  • Loading branch information
simplerobot committed Dec 2, 2020
1 parent 305b7a4 commit fdeb172
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ int stlink_load_device_params(stlink_t *sl) {
DLOG("Loading device parameters....\n");
const struct stlink_chipid_params *params = NULL;
stlink_core_id(sl);
uint32_t chip_id;
uint32_t chip_id = 0;
uint32_t flash_size;

stlink_chip_id(sl, &chip_id);
Expand Down

0 comments on commit fdeb172

Please sign in to comment.