From: Jonathan Neuschäfer Date: Fri, 18 Feb 2022 00:09:18 +0000 (+0100) Subject: clk: loongson1: Terminate clk_div_table with sentinel element X-Git-Tag: Ubuntu-5.15.0-29.30~1008 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=0a9f07cd72355d5779a480ae1679af0f9ec6a638;p=mirror_ubuntu-jammy-kernel.git clk: loongson1: Terminate clk_div_table with sentinel element BugLink: https://bugs.launchpad.net/bugs/1969110 [ Upstream commit 3eb00f89162e80083dfcaa842468b510462cfeaa ] In order that the end of a clk_div_table can be detected, it must be terminated with a sentinel element (.div = 0). Fixes: b4626a7f4892 ("CLK: Add Loongson1C clock support") Signed-off-by: Jonathan Neuschäfer Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/r/20220218000922.134857-3-j.neuschaefer@gmx.net Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin (cherry picked from commit f4aee7714a1cc6776eb8f4608d9e88536efc4863) Signed-off-by: Paolo Pisati --- diff --git a/drivers/clk/loongson1/clk-loongson1c.c b/drivers/clk/loongson1/clk-loongson1c.c index 703f87622cf5..1ebf740380ef 100644 --- a/drivers/clk/loongson1/clk-loongson1c.c +++ b/drivers/clk/loongson1/clk-loongson1c.c @@ -37,6 +37,7 @@ static const struct clk_div_table ahb_div_table[] = { [1] = { .val = 1, .div = 4 }, [2] = { .val = 2, .div = 3 }, [3] = { .val = 3, .div = 3 }, + [4] = { /* sentinel */ } }; void __init ls1x_clk_init(void)