Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 14ce2ef9 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "qseecom: improve operation when app unload returns EBUSY"

parents fd84b040 72729b4d
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -3133,6 +3133,16 @@ static int qseecom_unload_app(struct qseecom_dev_handle *data,

	if (!ptr_app->ref_cnt) {
		ret = __qseecom_unload_app(data, data->client.app_id);
		if (ret == -EBUSY) {
			/*
			 * If unload failed due to EBUSY, don't free mem
			 * just restore app ref_cnt and return -EBUSY
			 */
			pr_warn("unload ta %d(%s) EBUSY\n",
				data->client.app_id, data->client.app_name);
			ptr_app->ref_cnt++;
			return ret;
		}
		spin_lock_irqsave(&qseecom.registered_app_list_lock, flags);
		list_del(&ptr_app->list);
		spin_unlock_irqrestore(&qseecom.registered_app_list_lock,
@@ -3151,7 +3161,6 @@ static int qseecom_unload_app(struct qseecom_dev_handle *data,
	return ret;
}


static int qseecom_prepare_unload_app(struct qseecom_dev_handle *data)
{
	struct qseecom_unload_app_pending_list *entry = NULL;