From: kernel test robot <lkp(a)intel.com>
drivers/tee/optee/shm_pool.c:34:28-34: ERROR: application of sizeof to pointer
sizeof when applied to a pointer typed expression gives the size of
the pointer
Generated by: scripts/coccinelle/misc/noderef.cocci
Fixes: 5a769f6ff439 ("optee: Fix multi page dynamic shm pool alloc")
CC: Sumit Garg <sumit.garg(a)linaro.org>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
tree:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 856deb866d16e29bd65952e0289066f6078af773
commit: 5a769f6ff439cedc547395a6dc78faa26108f741 optee: Fix multi page dynamic shm pool
alloc
shm_pool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/tee/optee/shm_pool.c
+++ b/drivers/tee/optee/shm_pool.c
@@ -31,7 +31,7 @@ static int pool_op_alloc(struct tee_shm_
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)
return -ENOMEM;