Skip to content

Commit

Permalink
Fix obvious typo (missing return).
Browse files Browse the repository at this point in the history
  • Loading branch information
henrygab committed Jul 9, 2024
1 parent 1047fed commit e857e49
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions nand/spi_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,13 +507,12 @@ static int read_id(nand_identity_t * identity_out)
csel_deselect();

// check spi return
if (SPI_RET_OK == ret) {
identity_out->Manufacturer = rx_data[READ_ID_MFR_INDEX];
identity_out->DeviceID = rx_data[READ_ID_DEVICE_INDEX];
}
else {
if (SPI_RET_OK != ret) {
return SPI_NAND_RET_BAD_SPI;
}
identity_out->Manufacturer = rx_data[READ_ID_MFR_INDEX];
identity_out->DeviceID = rx_data[READ_ID_DEVICE_INDEX];
return SPI_RET_OK;
}

static int set_feature(uint8_t reg, uint8_t data, uint32_t timeout)
Expand Down

0 comments on commit e857e49

Please sign in to comment.