* [PATCH] clk: imx: clk-imx7ulp: Add missing sentinel of ulp_div_table
@ 2019-11-22 6:11 Peng Fan
2019-12-09 2:54 ` Shawn Guo
0 siblings, 1 reply; 2+ messages in thread
From: Peng Fan @ 2019-11-22 6:11 UTC (permalink / raw)
To: sboyd, shawnguo, s.hauer, festevam, Abel Vesa
Cc: kernel, dl-linux-imx, Aisheng Dong, linux-clk, linux-arm-kernel,
linux-kernel, Leonard Crestez, Alice Guo, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
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")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/clk/imx/clk-imx7ulp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/imx/clk-imx7ulp.c b/drivers/clk/imx/clk-imx7ulp.c
index 3fdf3d494f0a..281191b55b3a 100644
--- a/drivers/clk/imx/clk-imx7ulp.c
+++ b/drivers/clk/imx/clk-imx7ulp.c
@@ -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 = {
--
2.16.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: imx: clk-imx7ulp: Add missing sentinel of ulp_div_table
2019-11-22 6:11 [PATCH] clk: imx: clk-imx7ulp: Add missing sentinel of ulp_div_table Peng Fan
@ 2019-12-09 2:54 ` Shawn Guo
0 siblings, 0 replies; 2+ messages in thread
From: Shawn Guo @ 2019-12-09 2:54 UTC (permalink / raw)
To: Peng Fan
Cc: sboyd, s.hauer, festevam, Abel Vesa, kernel, dl-linux-imx,
Aisheng Dong, linux-clk, linux-arm-kernel, linux-kernel,
Leonard Crestez, Alice Guo
On Fri, Nov 22, 2019 at 06:11:42AM +0000, Peng Fan wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> 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")
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-09 2:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 6:11 [PATCH] clk: imx: clk-imx7ulp: Add missing sentinel of ulp_div_table Peng Fan
2019-12-09 2:54 ` Shawn Guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).