aboutsummaryrefslogtreecommitdiff
path: root/drivers/soc/bcm/raspberrypi-power.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/soc/bcm/raspberrypi-power.c')
-rw-r--r--drivers/soc/bcm/raspberrypi-power.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/soc/bcm/raspberrypi-power.c b/drivers/soc/bcm/raspberrypi-power.c
index f7ed1187518b..a78dfe0a2b50 100644
--- a/drivers/soc/bcm/raspberrypi-power.c
+++ b/drivers/soc/bcm/raspberrypi-power.c
@@ -165,8 +165,10 @@ static int rpi_power_probe(struct platform_device *pdev)
return -ENOMEM;
rpi_domains->xlate.domains =
- devm_kzalloc(dev, sizeof(*rpi_domains->xlate.domains) *
- RPI_POWER_DOMAIN_COUNT, GFP_KERNEL);
+ devm_kcalloc(dev,
+ RPI_POWER_DOMAIN_COUNT,
+ sizeof(*rpi_domains->xlate.domains),
+ GFP_KERNEL);
if (!rpi_domains->xlate.domains)
return -ENOMEM;