qseecom: fix an issue related to search app when unloading an app
Make a change in qseecom_unload_app to stop the execution of app
searching when an app is founded, even if this app is in use with
ref_cnt greater than one.
Change-Id: I0328252668ef1069ec514bfb913b927a7da76594
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: William Clark <wclark@codeaurora.org>
diff --git a/drivers/misc/qseecom.c b/drivers/misc/qseecom.c
index b55ee8d..ff960cf 100644
--- a/drivers/misc/qseecom.c
+++ b/drivers/misc/qseecom.c
@@ -878,15 +878,9 @@
(void *)data->client.app_name,
strlen(data->client.app_name))) {
found_app = true;
- if (app_crash) {
+ if (app_crash || ptr_app->ref_cnt == 1)
unload = true;
- break;
- } else {
- if (ptr_app->ref_cnt == 1) {
- unload = true;
- break;
- }
- }
+ break;
} else {
found_dead_app = true;
break;