[PATCH] firmware: arm_scmi: fix noderef.cocci warnings
kernel test robot
lkp at intel.com
Tue Oct 27 02:04:40 EDT 2020
From: kernel test robot <lkp at intel.com>
drivers/firmware/arm_scmi/voltage.c:381:11-17: 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: Cristian Marussi <cristian.marussi at arm.com>
Signed-off-by: kernel test robot <lkp at intel.com>
---
url: https://github.com/0day-ci/linux/commits/Cristian-Marussi/Add-support-for-SCMIv3-0-Voltage-Domain-Protocol-and-SCMI-Regulator/20201027-043404
base: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next
voltage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/firmware/arm_scmi/voltage.c
+++ b/drivers/firmware/arm_scmi/voltage.c
@@ -378,7 +378,7 @@ static int scmi_voltage_protocol_init(st
if (vinfo->num_domains) {
vinfo->domains = devm_kcalloc(handle->dev, vinfo->num_domains,
- sizeof(vinfo->domains),
+ sizeof(*vinfo->domains),
GFP_KERNEL);
if (!vinfo->domains)
return -ENOMEM;
More information about the linux-arm-kernel
mailing list