summaryrefslogtreecommitdiffstats
path: root/drivers/clk/sunxi-ng/ccu-sun8i-h3.c
diff options
context:
space:
mode:
authorJernej Skrabec <jernej.skrabec@siol.net>2020-12-02 21:38:17 +0100
committerStephen Boyd <sboyd@kernel.org>2020-12-20 00:54:02 +0100
commit48f68de00c1405351fa0e7bc44bca067c49cd0a3 (patch)
tree43c1e63b7842cff4e5f60be0558f1422243657c9 /drivers/clk/sunxi-ng/ccu-sun8i-h3.c
parentclk: s2mps11: Fix a resource leak in error handling paths in the probe function (diff)
downloadlinux-48f68de00c1405351fa0e7bc44bca067c49cd0a3.tar.xz
linux-48f68de00c1405351fa0e7bc44bca067c49cd0a3.zip
clk: sunxi-ng: Make sure divider tables have sentinel
Two clock divider tables are missing sentinel at the end. Effect of that is that clock framework reads past the last entry. Fix that with adding sentinel at the end. Issue was discovered with KASan. Fixes: 0577e4853bfb ("clk: sunxi-ng: Add H3 clocks") Fixes: c6a0637460c2 ("clk: sunxi-ng: Add A64 clocks") Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Link: https://lore.kernel.org/r/20201202203817.438713-1-jernej.skrabec@siol.net Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/sunxi-ng/ccu-sun8i-h3.c')
-rw-r--r--drivers/clk/sunxi-ng/ccu-sun8i-h3.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-h3.c b/drivers/clk/sunxi-ng/ccu-sun8i-h3.c
index 6b636362379e..7e629a4493af 100644
--- a/drivers/clk/sunxi-ng/ccu-sun8i-h3.c
+++ b/drivers/clk/sunxi-ng/ccu-sun8i-h3.c
@@ -322,6 +322,7 @@ static struct clk_div_table ths_div_table[] = {
{ .val = 1, .div = 2 },
{ .val = 2, .div = 4 },
{ .val = 3, .div = 6 },
+ { /* Sentinel */ },
};
static SUNXI_CCU_DIV_TABLE_WITH_GATE(ths_clk, "ths", "osc24M",
0x074, 0, 2, ths_div_table, BIT(31), 0);