mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 18:58:27 +08:00
SPI driver: Correct return value in case of a certain error condition
This commit is contained in:
@@ -402,7 +402,7 @@ int spi_register(FAR struct spi_dev_s *spi, int bus)
|
||||
|
||||
/* Return the result of the registration */
|
||||
|
||||
return OK;
|
||||
return ret;
|
||||
}
|
||||
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -99,7 +99,9 @@ int spi_transfer(FAR struct spi_dev_s *spi, FAR struct spi_sequence_s *seq)
|
||||
SPI_SETMODE(spi, seq->mode);
|
||||
SPI_SETBITS(spi, seq->nbits);
|
||||
|
||||
/* Select the SPI device in preparation for the transfer */
|
||||
/* Select the SPI device in preparation for the transfer.
|
||||
* REVISIT: This is redundant.
|
||||
*/
|
||||
|
||||
SPI_SELECT(spi, seq->dev, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user