From: kernel test robot <lkp(a)intel.com>
drivers/gpio/gpio-virtio.c:261:42-48: 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: Viresh Kumar <viresh.kumar(a)linaro.org>
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
url:
https://github.com/0day-ci/linux/commits/Viresh-Kumar/gpio-Add-virtio-gpi...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
614cb2751d3150850d459bee596c397f344a7936
:::::: branch date: 7 hours ago
:::::: commit date: 7 hours ago
gpio-virtio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpio/gpio-virtio.c
+++ b/drivers/gpio/gpio-virtio.c
@@ -258,7 +258,7 @@ static const char **virtio_gpio_get_name
return NULL;
}
- names = devm_kcalloc(dev, config->ngpio, sizeof(names), GFP_KERNEL);
+ names = devm_kcalloc(dev, config->ngpio, sizeof(*names), GFP_KERNEL);
if (!names)
return NULL;