[PATCH v4] crypto/amlogic: Use devm APIs for clock management
Herbert Xu
herbert at gondor.apana.org.au
Wed Sep 23 01:50:28 PDT 2026
On Wed, Sep 16, 2026 at 11:12:27PM +0530, Mohamad Raizudeen wrote:
> The driver currently gets the core clock and manually enables it using
> clk_prepare_enable(). This requires matching calls to
> clk_disable_unprepare() in the error paths and remove function.
>
> Switch to devm_clk_get_enabled() instead. This lets the kernel handle
> enabling and disabling the clock automatically, which allow us to drop
> the manual cleanup code and keeps the probe function simple.
>
> Reported-by: kernel test robot <lkp at intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202608310329.QgxCCMs1-lkp@intel.com/
> Signed-off-by: Mohamad Raizudeen <raizudeen.kerneldev at gmail.com>
> ---
> Changes in v4:
> - Fix typo in meson_allocate_chanlist() function name.
> - Add error_chanlist label to properly free chanlist if IRQ requests
> fail, preventing a memory leak.
>
> Link to v3: https://lore.kernel.org/all/20260916154941.7254-1-raizudeen.kerneldev@gmail.com/T/
> Link to v2: https://lore.kernel.org/all/20260901024302.5407-1-raizudeen.kerneldev@gmail.com/T/
> Link to separate IRQ fix patch [1]: https://lore.kernel.org/all/20260908160120.4805-1-raizudeen.kerneldev@gmail.com/T/
>
> drivers/crypto/amlogic/amlogic-gxl-core.c | 31 +++++++++--------------
> 1 file changed, 12 insertions(+), 19 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
More information about the linux-amlogic
mailing list