Re: [PATCH] serial: sc16is7xx: Fix clock leak on invalid clock frequency
From: Xiangwu Lai
Date: Fri Nov 13 2026 - 10:51:43 EST
Hi Hugo,
thanks for the review!
Agreed, devm_clk_get_optional_enabled() is the cleaner way: the clock
reference is dropped and the clock disabled automatically on probe
failure and on remove, so the manual management, the out_clk label
and the clk_disable_unprepare() in sc16is7xx_remove() all go away,
and the -EINVAL path keeps its original plain return.
I've reworked the patch accordingly; v2 follows shortly.
Best regards,
Xiangwu Lai