spi: flash: properly copy the JEDEC ID from the buffer

tags/0.1.0
S.J.R. van Schaik 8 years ago
parent 460fc8f7a5
commit 440c598d16
  1. 2
      source/drivers/spi_flash.c

@ -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…
Cancel
Save