Skip to content

Commit 88a3856

Browse files
jing yangyangjenswi-linaro
authored andcommitted
tee/optee/shm_pool: fix application of sizeof to pointer
sizeof when applied to a pointer typed expression gives the size of the pointer. ./drivers/tee/optee/shm_pool.c:38:28-34: ERROR application of sizeof to pointer This issue was detected with the help of Coccinelle. Reviewed-by: Daniel Thompson <[email protected]> Reported-by: Zeal Robot <[email protected]> Signed-off-by: jing yangyang <[email protected]> Signed-off-by: Jens Wiklander <[email protected]>
1 parent 7d2a07b commit 88a3856

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tee/optee/shm_pool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,
3535
unsigned int nr_pages = 1 << order, i;
3636
struct page **pages;
3737

38-
pages = kcalloc(nr_pages, sizeof(pages), GFP_KERNEL);
38+
pages = kcalloc(nr_pages, sizeof(*pages), GFP_KERNEL);
3939
if (!pages) {
4040
rc = -ENOMEM;
4141
goto err;

0 commit comments

Comments
 (0)