diff options
| author | David Lechner <[email protected]> | 2026-03-13 09:46:04 -0500 |
|---|---|---|
| committer | David Lechner <[email protected]> | 2026-03-24 12:32:02 -0500 |
| commit | 730958e9b01801fb2be194c1281e886236f4d08d (patch) | |
| tree | f842b72316d66b87f2bf23f1cb3cc9790799e1f8 | |
| parent | 71e736ed6d4ff22130aff7b12b0150e042f64cf8 (diff) | |
clk: mediatek: mt7623: fix pericfg priv_auto size
Change the pericfg priv_auto size to mtk_clk_priv. The driver is
registered using mtk_common_clk_infrasys_init() which expect that
struct.
The old value of struct mtk_cg_priv was larger, so there was no issue
out of bounds access.
Also replace tab with space to be consistent with the surrounding code.
Reported-by: Julien Stephan <[email protected]>
Closes: https://lore.kernel.org/u-boot/CAEHHSvYMiCZ4jAXp6jEhg6AhZ5Dv3_Ak-8H1mT7S2FPD3_X7dw@mail.gmail.com/
Reviewed-by: Julien Stephan <[email protected]>
Link: https://patch.msgid.link/20260313-clk-mtk-fix-priv-auto-size-v1-1-bc649e1b301a@baylibre.com
Signed-off-by: David Lechner <[email protected]>
| -rw-r--r-- | drivers/clk/mediatek/clk-mt7623.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/mediatek/clk-mt7623.c b/drivers/clk/mediatek/clk-mt7623.c index 41bd91a8e05..0a302b405e2 100644 --- a/drivers/clk/mediatek/clk-mt7623.c +++ b/drivers/clk/mediatek/clk-mt7623.c @@ -1194,7 +1194,7 @@ U_BOOT_DRIVER(mtk_clk_pericfg) = { .id = UCLASS_CLK, .of_match = mt7623_pericfg_compat, .probe = mt7623_pericfg_probe, - .priv_auto = sizeof(struct mtk_cg_priv), + .priv_auto = sizeof(struct mtk_clk_priv), .ops = &mtk_clk_infrasys_ops, .flags = DM_FLAG_PRE_RELOC, }; |
