Skip to content

Commit 5f61c3f

Browse files
authored
Merge pull request #666 from trik/sdcard-mutex-unlock
fix(Portenta_SDCARD): unlock mutex on deinit failure
2 parents 7b645b7 + 29b412c commit 5f61c3f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libraries/Portenta_SDCARD/src/SDMMCBlockDevice.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ int SDMMCBlockDevice::deinit()
115115
_sd_state = BSP_SD_DeInit ();
116116
if(_sd_state != MSD_OK) {
117117
debug_if (SD_DBG, "SD card deinitialization failed\n");
118+
unlock();
118119
return SD_BLOCK_DEVICE_ERROR;
119120
}
120121
_is_initialized = false;

0 commit comments

Comments
 (0)