Skip to content

Commit 7e3debb

Browse files
Pei Xiaovireshk
authored andcommitted
cpufreq: qcom-nvmem: add sentinel to qcom_cpufreq_ipq806x_match_list
The of_device_id table is expected to be NULL-terminated. Without the sentinel, the traversal of the array can lead to out-of-bound access, causing undefined behavior. This adds the missing sentinel to the qcom_cpufreq_ipq806x_match_list array. Fixes: 58f5d39 ("cpufreq: qcom-nvmem: add compatible fallback for ipq806x for no SMEM") Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent 8f0b4cc commit 7e3debb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/cpufreq/qcom-cpufreq-nvmem.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ static const struct of_device_id qcom_cpufreq_ipq806x_match_list[] __maybe_unuse
263263
{ .compatible = "qcom,ipq8066", .data = (const void *)QCOM_ID_IPQ8066 },
264264
{ .compatible = "qcom,ipq8068", .data = (const void *)QCOM_ID_IPQ8068 },
265265
{ .compatible = "qcom,ipq8069", .data = (const void *)QCOM_ID_IPQ8069 },
266+
{ /* sentinel */ }
266267
};
267268

268269
static int qcom_cpufreq_ipq8064_name_version(struct device *cpu_dev,

0 commit comments

Comments
 (0)