Avoid acquiring lock twice (#7555)

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
oscgonfer
2025-08-06 13:38:36 +02:00
committed by GitHub
parent 27c6b24e3a
commit a23c58c10a

View File

@@ -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;
}