Skip to content

Commit 36f1fa0

Browse files
author
Jarno Lamsa
committed
Remove extra _deselect to prevent possible hard fault
If read timeout happens, the _deselect will get called twice causing a hard fault happening when mutex is released without being locked. The SDBlockDevice::read is calling the _deselect in every case.
1 parent 870c3bc commit 36f1fa0

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

components/storage/blockdevice/COMPONENT_SD/SDBlockDevice.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,6 @@ int SDBlockDevice::_read(uint8_t *buffer, uint32_t length)
892892
// read until start byte (0xFE)
893893
if (false == _wait_token(SPI_START_BLOCK)) {
894894
debug_if(SD_DBG, "Read timeout\n");
895-
_deselect();
896895
return SD_BLOCK_DEVICE_ERROR_NO_RESPONSE;
897896
}
898897

0 commit comments

Comments
 (0)