File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -619,9 +619,18 @@ static int optee_ffa_do_call_with_arg(struct tee_context *ctx,
619
619
.data2 = (u32 )(shm -> sec_world_id >> 32 ),
620
620
.data3 = shm -> offset ,
621
621
};
622
- struct optee_msg_arg * arg = tee_shm_get_va (shm , 0 );
623
- unsigned int rpc_arg_offs = OPTEE_MSG_GET_ARG_SIZE (arg -> num_params );
624
- struct optee_msg_arg * rpc_arg = tee_shm_get_va (shm , rpc_arg_offs );
622
+ struct optee_msg_arg * arg ;
623
+ unsigned int rpc_arg_offs ;
624
+ struct optee_msg_arg * rpc_arg ;
625
+
626
+ arg = tee_shm_get_va (shm , 0 );
627
+ if (IS_ERR (arg ))
628
+ return PTR_ERR (arg );
629
+
630
+ rpc_arg_offs = OPTEE_MSG_GET_ARG_SIZE (arg -> num_params );
631
+ rpc_arg = tee_shm_get_va (shm , rpc_arg_offs );
632
+ if (IS_ERR (rpc_arg ))
633
+ return PTR_ERR (rpc_arg );
625
634
626
635
return optee_ffa_yielding_call (ctx , & data , rpc_arg );
627
636
}
You can’t perform that action at this time.
0 commit comments