summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2026-01-21 18:26:56 +0300
committerArnd Bergmann <arnd@arndb.de>2026-01-21 18:26:57 +0300
commit06e981ae1648390f404a1e36fce19a9fea7eeb95 (patch)
tree5a28948fd89c63f7ff3e6aea23ceee5a4d05986b
parentf716774b2cc873fe59d34d137f36f3b609bc1c84 (diff)
parent1c05d9a4cab2abfb93ebce5edaa17752126b6d35 (diff)
downloadlinux-06e981ae1648390f404a1e36fce19a9fea7eeb95.tar.xz
Merge tag 'qcomtee-fixes-for-6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee into soc/drivers
QCOMTEE fixes for 6.20 Small cleanups for the qcomtee driver to align with recommended coding practices for the cleanup.h infrastructure. * tag 'qcomtee-fixes-for-6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee: tee: qcomtee: user: Fix confusing cleanup.h syntax tee: qcomtee: mem: Fix confusing cleanup.h syntax tee: qcomtee: call: Fix confusing cleanup.h syntax Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--drivers/tee/qcomtee/call.c17
-rw-r--r--drivers/tee/qcomtee/mem_obj.c4
-rw-r--r--drivers/tee/qcomtee/user_obj.c8
3 files changed, 14 insertions, 15 deletions
diff --git a/drivers/tee/qcomtee/call.c b/drivers/tee/qcomtee/call.c
index 65f9140d4e1f..8f8830f0df26 100644
--- a/drivers/tee/qcomtee/call.c
+++ b/drivers/tee/qcomtee/call.c
@@ -395,9 +395,7 @@ static int qcomtee_object_invoke(struct tee_context *ctx,
struct tee_ioctl_object_invoke_arg *arg,
struct tee_param *params)
{
- struct qcomtee_object_invoke_ctx *oic __free(kfree) = NULL;
struct qcomtee_context_data *ctxdata = ctx->data;
- struct qcomtee_arg *u __free(kfree) = NULL;
struct qcomtee_object *object;
int i, ret, result;
@@ -412,12 +410,14 @@ static int qcomtee_object_invoke(struct tee_context *ctx,
}
/* Otherwise, invoke a QTEE object: */
- oic = qcomtee_object_invoke_ctx_alloc(ctx);
+ struct qcomtee_object_invoke_ctx *oic __free(kfree) =
+ qcomtee_object_invoke_ctx_alloc(ctx);
if (!oic)
return -ENOMEM;
/* +1 for ending QCOMTEE_ARG_TYPE_INV. */
- u = kcalloc(arg->num_params + 1, sizeof(*u), GFP_KERNEL);
+ struct qcomtee_arg *u __free(kfree) = kcalloc(arg->num_params + 1, sizeof(*u),
+ GFP_KERNEL);
if (!u)
return -ENOMEM;
@@ -562,9 +562,8 @@ static int qcomtee_supp_send(struct tee_context *ctx, u32 errno, u32 num_params,
static int qcomtee_open(struct tee_context *ctx)
{
- struct qcomtee_context_data *ctxdata __free(kfree) = NULL;
-
- ctxdata = kzalloc(sizeof(*ctxdata), GFP_KERNEL);
+ struct qcomtee_context_data *ctxdata __free(kfree) = kzalloc(sizeof(*ctxdata),
+ GFP_KERNEL);
if (!ctxdata)
return -ENOMEM;
@@ -645,12 +644,12 @@ static void qcomtee_get_version(struct tee_device *teedev,
static void qcomtee_get_qtee_feature_list(struct tee_context *ctx, u32 id,
u32 *version)
{
- struct qcomtee_object_invoke_ctx *oic __free(kfree) = NULL;
struct qcomtee_object *client_env, *service;
struct qcomtee_arg u[3] = { 0 };
int result;
- oic = qcomtee_object_invoke_ctx_alloc(ctx);
+ struct qcomtee_object_invoke_ctx *oic __free(kfree) =
+ qcomtee_object_invoke_ctx_alloc(ctx);
if (!oic)
return;
diff --git a/drivers/tee/qcomtee/mem_obj.c b/drivers/tee/qcomtee/mem_obj.c
index 228a3e30a31b..a16f8fc39b8d 100644
--- a/drivers/tee/qcomtee/mem_obj.c
+++ b/drivers/tee/qcomtee/mem_obj.c
@@ -88,11 +88,11 @@ int qcomtee_memobj_param_to_object(struct qcomtee_object **object,
struct tee_param *param,
struct tee_context *ctx)
{
- struct qcomtee_mem_object *mem_object __free(kfree) = NULL;
struct tee_shm *shm;
int err;
- mem_object = kzalloc(sizeof(*mem_object), GFP_KERNEL);
+ struct qcomtee_mem_object *mem_object __free(kfree) = kzalloc(sizeof(*mem_object),
+ GFP_KERNEL);
if (!mem_object)
return -ENOMEM;
diff --git a/drivers/tee/qcomtee/user_obj.c b/drivers/tee/qcomtee/user_obj.c
index 0139905f2684..6aa3aefd67f0 100644
--- a/drivers/tee/qcomtee/user_obj.c
+++ b/drivers/tee/qcomtee/user_obj.c
@@ -228,10 +228,10 @@ static int qcomtee_user_object_dispatch(struct qcomtee_object_invoke_ctx *oic,
{
struct qcomtee_user_object *uo = to_qcomtee_user_object(object);
struct qcomtee_context_data *ctxdata = uo->ctx->data;
- struct qcomtee_ureq *ureq __free(kfree) = NULL;
int errno;
- ureq = kzalloc(sizeof(*ureq), GFP_KERNEL);
+ struct qcomtee_ureq *ureq __free(kfree) = kzalloc(sizeof(*ureq),
+ GFP_KERNEL);
if (!ureq)
return -ENOMEM;
@@ -367,10 +367,10 @@ int qcomtee_user_param_to_object(struct qcomtee_object **object,
struct tee_param *param,
struct tee_context *ctx)
{
- struct qcomtee_user_object *user_object __free(kfree) = NULL;
int err;
- user_object = kzalloc(sizeof(*user_object), GFP_KERNEL);
+ struct qcomtee_user_object *user_object __free(kfree) =
+ kzalloc(sizeof(*user_object), GFP_KERNEL);
if (!user_object)
return -ENOMEM;