spi: flash: properly copy the JEDEC ID from the buffer
This commit is contained in:
parent
460fc8f7a5
commit
440c598d16
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ static size_t spi_flash_get_jedec_id(struct flash_dev *dev, uint8_t *jedec_id,
|
|||
|
||||
spi_tx_rx(spi_dev, buf, sizeof buf, cmd, sizeof cmd);
|
||||
|
||||
memcpy(jedec_id, buf + 1, min(sizeof buf, len));
|
||||
memcpy(jedec_id, buf, min(sizeof buf, len));
|
||||
|
||||
return len;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue