Merge "qseecom: Fix ion memory issue during unload app failure"

This commit is contained in:
Linux Build Service Account 2016-08-07 23:22:40 -07:00 committed by Gerrit - the friendly Code Review server
commit 2b3049ef40

View file

@ -2100,7 +2100,7 @@ static int qseecom_unload_app(struct qseecom_dev_handle *data,
if (!memcmp(data->client.app_name, "keymaste", strlen("keymaste"))) { if (!memcmp(data->client.app_name, "keymaste", strlen("keymaste"))) {
pr_debug("Do not unload keymaster app from tz\n"); pr_debug("Do not unload keymaster app from tz\n");
return 0; goto unload_exit;
} }
__qseecom_cleanup_app(data); __qseecom_cleanup_app(data);
@ -2152,7 +2152,7 @@ static int qseecom_unload_app(struct qseecom_dev_handle *data,
pr_err("scm_call to unload app (id = %d) failed\n", pr_err("scm_call to unload app (id = %d) failed\n",
req.app_id); req.app_id);
ret = -EFAULT; ret = -EFAULT;
goto not_release_exit; goto unload_exit;
} else { } else {
pr_warn("App id %d now unloaded\n", req.app_id); pr_warn("App id %d now unloaded\n", req.app_id);
} }
@ -2160,7 +2160,7 @@ static int qseecom_unload_app(struct qseecom_dev_handle *data,
pr_err("app (%d) unload_failed!!\n", pr_err("app (%d) unload_failed!!\n",
data->client.app_id); data->client.app_id);
ret = -EFAULT; ret = -EFAULT;
goto not_release_exit; goto unload_exit;
} }
if (resp.result == QSEOS_RESULT_SUCCESS) if (resp.result == QSEOS_RESULT_SUCCESS)
pr_debug("App (%d) is unloaded!!\n", pr_debug("App (%d) is unloaded!!\n",
@ -2170,7 +2170,7 @@ static int qseecom_unload_app(struct qseecom_dev_handle *data,
if (ret) { if (ret) {
pr_err("process_incomplete_cmd fail err: %d\n", pr_err("process_incomplete_cmd fail err: %d\n",
ret); ret);
goto not_release_exit; goto unload_exit;
} }
} }
} }
@ -2200,7 +2200,6 @@ static int qseecom_unload_app(struct qseecom_dev_handle *data,
unload_exit: unload_exit:
qseecom_unmap_ion_allocated_memory(data); qseecom_unmap_ion_allocated_memory(data);
data->released = true; data->released = true;
not_release_exit:
return ret; return ret;
} }