summaryrefslogtreecommitdiff
path: root/drivers/interconnect/qcom/qcs404.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/interconnect/qcom/qcs404.c')
-rw-r--r--drivers/interconnect/qcom/qcs404.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/interconnect/qcom/qcs404.c b/drivers/interconnect/qcom/qcs404.c
index 910081d6ddc0..b4966d8f3348 100644
--- a/drivers/interconnect/qcom/qcs404.c
+++ b/drivers/interconnect/qcom/qcs404.c
@@ -433,7 +433,8 @@ static int qnoc_probe(struct platform_device *pdev)
if (!qp)
return -ENOMEM;
- data = devm_kcalloc(dev, num_nodes, sizeof(*node), GFP_KERNEL);
+ data = devm_kzalloc(dev, struct_size(data, nodes, num_nodes),
+ GFP_KERNEL);
if (!data)
return -ENOMEM;