mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-29 14:10:53 +00:00
Avoid acquiring lock twice (#7555)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
@@ -112,9 +112,8 @@ bool NAU7802Sensor::saveCalibrationData()
|
||||
} else {
|
||||
okay = true;
|
||||
}
|
||||
spiLock->lock();
|
||||
// Note: SafeFile::close() already acquires the lock and releases it internally
|
||||
okay &= file.close();
|
||||
spiLock->unlock();
|
||||
|
||||
return okay;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user