Skip to content

Commit 73048a8

Browse files
Dan Carpenterstorulf
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 <[email protected]> Reviewed-by: Jens Wiklander <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent cf6444b commit 73048a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)