Skip to content

Commit 73048a8

Browse files
Dan CarpenterUlf Hansson
authored andcommitted
optee: Fix a NULL vs IS_ERR() check
The tee_shm_get_va() function never returns NULL, it returns error pointers. Update the check to match. Fixes: f0c8431 ("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>
1 parent cf6444b commit 73048a8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/tee/optee/rpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ static void handle_rpc_func_rpmb_probe_next(struct tee_context *ctx,
332332
}
333333
buf = tee_shm_get_va(params[1].u.memref.shm,
334334
params[1].u.memref.shm_offs);
335-
if (!buf) {
335+
if (IS_ERR(buf)) {
336336
arg->ret = TEEC_ERROR_BAD_PARAMETERS;
337337
return;
338338
}

0 commit comments

Comments
 (0)