summaryrefslogtreecommitdiffstats
path: root/drivers/soc/rockchip/pm_domains.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/soc/rockchip/pm_domains.c')
-rw-r--r--drivers/soc/rockchip/pm_domains.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 53efc386b1ad..111c44fc1c12 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -626,8 +626,7 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
pmu_info = match->data;
pmu = devm_kzalloc(dev,
- sizeof(*pmu) +
- pmu_info->num_domains * sizeof(pmu->domains[0]),
+ struct_size(pmu, domains, pmu_info->num_domains),
GFP_KERNEL);
if (!pmu)
return -ENOMEM;