linux/drivers/interconnect/qcom
Leonard Crestez 83c774f0c6 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: Leonard Crestez <leonard.crestez@nxp.com>
Fixes: 5e4e6c4d3a ("interconnect: qcom: Add QCS404 interconnect provider driver")
Link: https://lore.kernel.org/linux-pm/a7360abb6561917e30bbfaa6084578449152bf1d.1569348056.git.leonard.crestez@nxp.com/
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
2019-10-20 12:09:31 +03:00
..
Kconfig interconnect: qcom: remove COMPILE_TEST from CONFIG_INTERCONNECT_QCOM_QCS404 2019-08-15 11:19:12 +03:00
Makefile interconnect: qcom: Add QCS404 interconnect provider driver 2019-08-13 23:26:08 +03:00
qcs404.c interconnect: qcom: Fix icc_onecell_data allocation 2019-10-20 12:09:31 +03:00
sdm845.c interconnect: qcom: Fix icc_onecell_data allocation 2019-10-20 12:09:31 +03:00
smd-rpm.c interconnect: qcom: Add interconnect RPM over SMD driver 2019-08-13 23:06:40 +03:00
smd-rpm.h interconnect: qcom: Add interconnect RPM over SMD driver 2019-08-13 23:06:40 +03:00