clk: clps711x: Terminate clk_div_table with sentinel element
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Fri, 18 Feb 2022 00:09:20 +0000 (01:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 07:08:20 +0000 (09:08 +0200)
[ Upstream commit 8bed4ed5aa3431085d9d27afc35d684856460eda ]

In order that the end of a clk_div_table can be detected, it must be
terminated with a sentinel element (.div = 0).

Fixes: 631c53478973d ("clk: Add CLPS711X clk driver")
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Link: https://lore.kernel.org/r/20220218000922.134857-5-j.neuschaefer@gmx.net
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/clk-clps711x.c

index 9193f64561f6fc80d1308ecd6ba565d321e72d4d..4dcf15a882699965124c2759ea35a87f906d141e 100644 (file)
@@ -32,11 +32,13 @@ static const struct clk_div_table spi_div_table[] = {
        { .val = 1, .div = 8, },
        { .val = 2, .div = 2, },
        { .val = 3, .div = 1, },
+       { /* sentinel */ }
 };
 
 static const struct clk_div_table timer_div_table[] = {
        { .val = 0, .div = 256, },
        { .val = 1, .div = 1, },
+       { /* sentinel */ }
 };
 
 struct clps711x_clk {