Skip to content

Commit 29b412c

Browse files
committed
fix(Portenta_SDCARD): unlock mutex on deinit failure
1 parent f10a895 commit 29b412c

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)