[PATCH 0/3] clk: imx: imx8qxp-lpcg: Fix the clock-indices parsing

From: Abel Vesa

Date: Mon Nov 02 2026 - 07:24:41 EST


imx_lpcg_parse_clks_from_dt() trusts the clock-indices property of the
LPCG node. Duplicate entries leak a clock and make the error path
unregister another one twice, and more entries than an LPCG has clock
outputs overflow the on-stack arrays the property and the related
clock names are read into. The first two patches reject both. The last
one makes a failure to read the parent names return an error code
instead of the number of clocks.

Prepared with help from an LLM-based assistant.

Signed-off-by: Abel Vesa <abel.vesa@xxxxxxxxxxxxxxxx>
---
Abel Vesa (3):
clk: imx: imx8qxp-lpcg: Reject duplicate clock indices
clk: imx: imx8qxp-lpcg: Fix stack overflow with too many clock indices
clk: imx: imx8qxp-lpcg: Return an error if the parent names cannot be read

drivers/clk/imx/clk-imx8qxp-lpcg.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261102-imx8qxp-lpcg-duplicate-clock-indices-828fbaee36b0

Best regards,
--

Abel