SPI driver: Correct return value in case of a certain error condition

This commit is contained in:
Gregory Nutt
2016-08-06 08:07:30 -06:00
parent 2f7cae6e4a
commit 83c7b4d5d6
3 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -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;
+3 -1
View File
@@ -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);