Skip to content

Commit e2c02a8

Browse files
juhosgandersson
authored andcommitted
clk: qcom: mmcc-msm8974: 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(). Only compile tested. Fixes: d8b2120 ("clk: qcom: Add support for MSM8974's multimedia clock controller (MMCC)") 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 a903cfd commit e2c02a8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/clk/qcom/mmcc-msm8974.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ static struct freq_tbl ftbl_mmss_axi_clk[] = {
290290
F(291750000, P_MMPLL1, 4, 0, 0),
291291
F(400000000, P_MMPLL0, 2, 0, 0),
292292
F(466800000, P_MMPLL1, 2.5, 0, 0),
293+
{ }
293294
};
294295

295296
static struct clk_rcg2 mmss_axi_clk_src = {
@@ -314,6 +315,7 @@ static struct freq_tbl ftbl_ocmemnoc_clk[] = {
314315
F(150000000, P_GPLL0, 4, 0, 0),
315316
F(291750000, P_MMPLL1, 4, 0, 0),
316317
F(400000000, P_MMPLL0, 2, 0, 0),
318+
{ }
317319
};
318320

319321
static struct clk_rcg2 ocmemnoc_clk_src = {

0 commit comments

Comments
 (0)