From: kernel test robot drivers/dma-buf/dma-resv.c:525:7-13: 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 CC: Christian König Reported-by: kernel test robot Signed-off-by: kernel test robot --- url: https://github.com/0day-ci/linux/commits/Christian-K-nig/dma-buf-add-dma_resv_for_each_fence_unlocked/20210910-163040 base: git://anongit.freedesktop.org/drm-intel for-linux-next :::::: branch date: 28 hours ago :::::: commit date: 28 hours ago dma-resv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/dma-buf/dma-resv.c +++ b/drivers/dma-buf/dma-resv.c @@ -522,7 +522,7 @@ int dma_resv_get_fences(struct dma_resv /* Eventually re-allocate the array */ *shared = krealloc_array(*shared, count, - sizeof(*shared), + sizeof(**shared), GFP_KERNEL); if (count && !*shared) return -ENOMEM;