Commit 7e3debb4 authored by Pei Xiao's avatar Pei Xiao Committed by Viresh Kumar
Browse files

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: 58f5d39d ("cpufreq: qcom-nvmem: add compatible fallback for ipq806x for no SMEM")
Signed-off-by: default avatarPei Xiao <xiaopei01@kylinos.cn>
Reviewed-by: default avatarKonrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 8f0b4cce
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -263,6 +263,7 @@ static const struct of_device_id qcom_cpufreq_ipq806x_match_list[] __maybe_unuse
	{ .compatible = "qcom,ipq8066", .data = (const void *)QCOM_ID_IPQ8066 },
	{ .compatible = "qcom,ipq8068", .data = (const void *)QCOM_ID_IPQ8068 },
	{ .compatible = "qcom,ipq8069", .data = (const void *)QCOM_ID_IPQ8069 },
	{ /* sentinel */ }
};

static int qcom_cpufreq_ipq8064_name_version(struct device *cpu_dev,