Skip to contentSkip to conversation

clk: imx: clk-imx7ulp: Add missing sentinel of ulp_div_table

PATCH Applied Peng Fan 2 participants 2 messages Nov 22, 2019 – Dec 9, 2019

Subsystems (3)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore

Peng Fan

author reviewer
#0 lore raw

PATCH 1/1 clk: imx: clk-imx7ulp: Add missing sentinel of ulp_div_table

From: Peng Fan <[email protected]>

There should be a sentinel of ulp_div_table, otherwise _get_table_div may access data out of the array.

Fixes b1260067ac3d ("clk: imx: add imx7ulp clk driver")
---
 drivers/clk/imx/clk-imx7ulp.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imx7ulp.c +1 -0
index 3fdf3d494f0a..281191b55b3a 100644
@@ -40,6 +40,7 @@ static const struct clk_div_table ulp_div_table[] = {
 	{ .val = 5, .div = 16, },
 	{ .val = 6, .div = 32, },
 	{ .val = 7, .div = 64, },
+	{ /* sentinel */ },
 };
 
 static const int pcc2_uart_clk_ids[] __initconst = {
Signature · 1 line
2.16.4
Applied
#1 lore raw
Quoted 7 lines · Peng Fan

From: Peng Fan <[email protected]>

There should be a sentinel of ulp_div_table, otherwise _get_table_div may access data out of the array.

Fixes b1260067ac3d ("clk: imx: add imx7ulp clk driver")

Applied, thanks.