From ea551156f1a0eba7a85fc54970b5c621d1d5fffc Mon Sep 17 00:00:00 2001 From: Anmolpreet Kaur Date: Fri, 18 Sep 2020 12:28:37 +0530 Subject: [PATCH] qseecom: Propagate correct return value from TZ When unload app fails, return the correct return value that we get from TZ and not translate it to EFAULT. This will make sure that proper handling is done at the calling side. Change-Id: Ie850967e5c44b502b888324291a878d0a467b46b Signed-off-by: Anmolpreet Kaur --- drivers/misc/qseecom.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/misc/qseecom.c b/drivers/misc/qseecom.c index 36973dbe9cc1..2bbd36fa3897 100644 --- a/drivers/misc/qseecom.c +++ b/drivers/misc/qseecom.c @@ -3052,8 +3052,9 @@ static int __qseecom_unload_app(struct qseecom_dev_handle *data, sizeof(struct qseecom_unload_app_ireq), &resp, sizeof(resp)); if (ret) { - pr_err("scm_call to unload app (id = %d) failed\n", app_id); - return -EFAULT; + pr_err("scm_call to unload app (id = %d) failed ret: %d\n", + app_id, ret); + return ret; } switch (resp.result) { case QSEOS_RESULT_SUCCESS: