Skip to content

Commit 134ed10

Browse files
jan-kiszkaardbiesheuvel
authored andcommitted
efi: stmm: Drop unneeded null pointer check
The API documenation of setup_mm_hdr does not mention that dptr can be NULL, this is a local function, and no caller passes NULL. So drop the unneeded check. Signed-off-by: Jan Kiszka <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Acked-by: Sumit Garg <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent 01a3044 commit 134ed10

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/firmware/efi/stmm/tee_stmm_efi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ static void *setup_mm_hdr(u8 **dptr, size_t payload_size, size_t func)
185185

186186
var_hdr = (struct smm_variable_communicate_header *)mm_hdr->data;
187187
var_hdr->function = func;
188-
if (dptr)
189-
*dptr = comm_buf;
188+
*dptr = comm_buf;
190189

191190
return var_hdr->data;
192191
}

0 commit comments

Comments
 (0)