Re: [PATCH] pwm: mxs: Disable clock on invalid period error path

From: Xiangwu Lai

Date: Sun Nov 15 2026 - 22:11:05 EST


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@xxxxxxxxxx/

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@xxxxxxxxxxxxxxxxxxxx/

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