Skip to content

Commit 90ad946

Browse files
juhosgandersson
authored andcommitted
clk: qcom: gcc-ipq5018: fix terminating of frequency table arrays
The frequency table arrays are supposed to be terminated with an empty element. Add such entry to the end of the arrays where it is missing in order to avoid possible out-of-bound access when the table is traversed by functions like qcom_find_freq() or qcom_find_freq_floor(). Fixes: e3fdbef ("clk: qcom: Add Global Clock controller (GCC) driver for IPQ5018") Signed-off-by: Gabor Juhos <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 117e7dc commit 90ad946

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/clk/qcom/gcc-ipq5018.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,7 @@ static struct clk_rcg2 lpass_sway_clk_src = {
857857

858858
static const struct freq_tbl ftbl_pcie0_aux_clk_src[] = {
859859
F(2000000, P_XO, 12, 0, 0),
860+
{ }
860861
};
861862

862863
static struct clk_rcg2 pcie0_aux_clk_src = {
@@ -1099,6 +1100,7 @@ static const struct freq_tbl ftbl_qpic_io_macro_clk_src[] = {
10991100
F(100000000, P_GPLL0, 8, 0, 0),
11001101
F(200000000, P_GPLL0, 4, 0, 0),
11011102
F(320000000, P_GPLL0, 2.5, 0, 0),
1103+
{ }
11021104
};
11031105

11041106
static struct clk_rcg2 qpic_io_macro_clk_src = {
@@ -1194,6 +1196,7 @@ static struct clk_rcg2 ubi0_axi_clk_src = {
11941196
static const struct freq_tbl ftbl_ubi0_core_clk_src[] = {
11951197
F(850000000, P_UBI32_PLL, 1, 0, 0),
11961198
F(1000000000, P_UBI32_PLL, 1, 0, 0),
1199+
{ }
11971200
};
11981201

11991202
static struct clk_rcg2 ubi0_core_clk_src = {

0 commit comments

Comments
 (0)