Skip to content
Commit 83c774f0 authored by Leonard Crestez's avatar Leonard Crestez Committed by Georgi Djakov
Browse files

interconnect: qcom: Fix icc_onecell_data allocation



This is a struct with a trailing zero-length array of icc_node pointers
but it's allocated as if it were a single array of icc_nodes instead.

This allocates too much memory at probe time but shouldn't have any
noticeable effect. Both sdm845 and qcs404 are affected.

Fix by replacing kcalloc with kzalloc and using the "struct_size" macro.

Signed-off-by: default avatarLeonard Crestez <leonard.crestez@nxp.com>
Fixes: 5e4e6c4d ("interconnect: qcom: Add QCS404 interconnect provider driver")
Link: https://lore.kernel.org/linux-pm/a7360abb6561917e30bbfaa6084578449152bf1d.1569348056.git.leonard.crestez@nxp.com/


Signed-off-by: default avatarGeorgi Djakov <georgi.djakov@linaro.org>
parent 4f5cafb5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment