[Bugfix][T106BUG-663] Fix the issue of immediate sleep without immediate restart
after FOTA upgrade
Only Configure:No
Affected branch:master
Affected module:fota
Is it affected on both ZXIC and MTK: ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I9b2e86d2017e877b362913247fe0d39882cce5ee
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-fota/lynq-qser-fota.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-fota/lynq-qser-fota.cpp
index 10f967a..1589c5f 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-fota/lynq-qser-fota.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-fota/lynq-qser-fota.cpp
@@ -537,14 +537,15 @@
if(ret != 0)
{
LYINFLOG("fota update fail!\n");
+ qser_wakelock_unlock(lock_fd);
+ tmp = qser_wakelock_destroy(lock_fd);
+ if(tmp < 0)
+ {
+ LYERRLOG("Destroy fota wakelock failed");
+ }
}
- qser_wakelock_unlock(lock_fd);
- tmp = qser_wakelock_destroy(lock_fd);
- if(tmp < 0)
- {
- LYERRLOG("Destroy fota wakelock failed");
- }
+
return ret;
}