[PATCH] pwm: mxs: Disable clock on invalid period error path
Xiangwu Lai
laixiangwu at cmss.chinamobile.com
Sun Nov 15 19:10:43 PST 2026
Hi,
I've noticed that Lee Jones' series "pwm: Fix various bugs
reported by Sashiko" also fixes the clock leak addressed by my
patch below, with a broader scope:
[PATCH 2/8] pwm: mxs: Return early when disabling and fix error-path clock leak
https://lore.kernel.org/all/20261105143847.2559586-3-lee@kernel.org/
Besides balancing clk_prepare_enable() on the same -EINVAL error
path, that patch also handles the !state->enabled case upfront,
avoiding a division by zero when state->period is zero, and it
already carries a Reviewed-by from Frank Li.
My patch for reference:
pwm: mxs: Disable clock on invalid period error path
https://lore.kernel.org/all/20261102105005.1007-1-laixiangwu@cmss.chinamobile.com/
Please feel free to drop my patch in favour of Lee's more complete
fix; there is no need to keep both.
Best regards,
Xiangwu Lai
More information about the linux-arm-kernel
mailing list