drivers/rwbuffer: Should call rwb_wrflush in rwb_uninitialize

to avoid lose the cached data in the write buffer

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-08-21 19:46:39 +08:00 committed by David Sidrane
parent a86a3d4d02
commit 62a840f992

View File

@ -880,6 +880,7 @@ void rwb_uninitialize(FAR struct rwbuffer_s *rwb)
if (rwb->wrmaxblocks > 0)
{
rwb_wrcanceltimeout(rwb);
rwb_wrflush(rwb);
nxsem_destroy(&rwb->wrsem);
if (rwb->wrbuffer)
{