projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf6444b
)
optee: Fix a NULL vs IS_ERR() check
author
Dan Carpenter
<dan.carpenter@linaro.org>
Thu, 5 Sep 2024 13:17:06 +0000
(16:17 +0300)
committer
Ulf Hansson
<ulf.hansson@linaro.org>
Mon, 9 Sep 2024 10:22:06 +0000
(12:22 +0200)
The tee_shm_get_va() function never returns NULL, it returns error
pointers. Update the check to match.
Fixes:
f0c8431568ee
("optee: probe RPMB device using RPMB subsystem")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Link:
https://lore.kernel.org/r/f8c12aed-b5d1-4522-bf95-622b8569706d@stanley.mountain
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/tee/optee/rpc.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/tee/optee/rpc.c
b/drivers/tee/optee/rpc.c
index a4b49fd1d46d7cce1fc38d709bf59bd99a9358b4..ebbbd42b0e3e72f4b222000c07d759509a74926e 100644
(file)
--- a/
drivers/tee/optee/rpc.c
+++ b/
drivers/tee/optee/rpc.c
@@
-332,7
+332,7
@@
static void handle_rpc_func_rpmb_probe_next(struct tee_context *ctx,
}
buf = tee_shm_get_va(params[1].u.memref.shm,
params[1].u.memref.shm_offs);
- if (
!buf
) {
+ if (
IS_ERR(buf)
) {
arg->ret = TEEC_ERROR_BAD_PARAMETERS;
return;
}