[PATCH] clk: imx5: Check the IIM clock before reading the i.MX53 revision
Krzysztof Kozlowski
krzk at kernel.org
Sun Nov 29 18:11:49 PST 2026
On Sun, 29 Nov 2026 19:25:33 +0000, Jiawen Liu wrote:
> During i.MX53 device-tree boot, mx53_clocks_init() reads the silicon
> revision from the IIM after calling clk_prepare_enable(). The IIM gate
> registration can return an error pointer that clk_prepare() dereferences.
> If a valid clock fails to prepare or enable, the callback still reads
> the IIM without acquiring its clock and then attempts an unmatched
> disable and unprepare.
>
> Use the existing registration diagnostic and skip the revision read
> when the IIM gate failed to register. Log prepare or enable failures,
> and read the revision and release the clock only after a successful
> acquisition. Continue USB and UART clock setup in all cases.
>
> Verified the control flow by source
> inspection, cross-built clk-imx5.o with ARM imx_v6_v7_defconfig, and ran
> git diff --check and checkpatch. No runtime or hardware reproduction
> was performed.
>
> Fixes: b8d4176fa59e ("ARM i.MX5: implement clocks using common clock framework")
> Signed-off-by: Jiawen Liu <liu1298662399 at gmail.com>
> ---
> drivers/clk/imx/clk-imx5.c | 15 ++++++++++++---
> 1 file changed, 12 insertions(+), 3 deletions(-)
>
You sent multiple independent patches, to multiple independent
subsystems. The amount of these patches clearly suggest this was
AI generated and most likely not tested.
More importantly, you sent all this work without properly organizing
relevant patches into patchsets. This makes reviewing difficult
and might cause multiple reviewers to address the same issue.
Replying to the entire set is impossible and requires handling each
patch independently, instead of applying or discarding the set.
Maintainers also won't see the bigger picture of your work. Quite
worrying.
Please read kernel documentation BEFORE posting more work. It will
explain you how to identify subsystems, how to organize your work per
subsystem (so a patchset grouping multiple patches with a short cover
letter), how to document the issue discovery method and what was
or was not tested.
Best regards,
Krzysztof
More information about the linux-arm-kernel
mailing list