summaryrefslogtreecommitdiffstats
path: root/drivers/tee
diff options
context:
space:
mode:
authorjing yangyang <jing.yangyang@zte.com.cn>2021-08-20 05:21:27 +0200
committerJens Wiklander <jens.wiklander@linaro.org>2021-09-14 07:54:56 +0200
commit88a3856c0a8c03188db7913f4d49379432fe1f93 (patch)
treec28002d3bded7920ea977abb5b37499e42fbee7c /drivers/tee
parentLinux 5.14 (diff)
downloadlinux-88a3856c0a8c03188db7913f4d49379432fe1f93.tar.xz
linux-88a3856c0a8c03188db7913f4d49379432fe1f93.zip
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 <daniel.thompson@linaro.org> Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'drivers/tee')
-rw-r--r--drivers/tee/optee/shm_pool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tee/optee/shm_pool.c b/drivers/tee/optee/shm_pool.c
index c41a9a501a6e..d167039af519 100644
--- a/drivers/tee/optee/shm_pool.c
+++ b/drivers/tee/optee/shm_pool.c
@@ -35,7 +35,7 @@ static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,
unsigned int nr_pages = 1 << order, i;
struct page **pages;
- pages = kcalloc(nr_pages, sizeof(pages), GFP_KERNEL);
+ pages = kcalloc(nr_pages, sizeof(*pages), GFP_KERNEL);
if (!pages) {
rc = -ENOMEM;
goto err;