Re: [PATCH] clk: test: Fix some memory leaks

From: Maxime Ripard
Date: Wed Oct 16 2024 - 05:09:42 EST


On Wed, 16 Oct 2024 10:26:58 +0800, Jinjie Ruan wrote:
> CONFIG_CLK_KUNIT_TEST=y, CONFIG_DEBUG_KMEMLEAK=y
> and CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y, the following memory leak occurs.
>
> If the KUNIT_ASSERT_*() fails, the latter (exit() or testcases)
> clk_put() or clk_hw_unregister() will fail to release the clk resource
>
> [ ... ]

Reviewed-by: Maxime Ripard <mripard@xxxxxxxxxx>

Thanks!
Maxime