Re: [PATCH] clk: mmp: Fix NULL vs IS_ERR() check
From: Krzysztof Kozlowski
Date: Fri Mar 07 2025 - 06:18:23 EST
On 07/03/2025 07:47, Charles Han wrote:
> The devm_kzalloc() function returns NULL on error, not error pointers.
> Fix the check.
>
> Fixes: 03437e857b0a ("clk: mmp: Add Marvell PXA1908 APMU driver")
> Signed-off-by: Charles Han <hanchunchao@xxxxxxxxxx>
> ---
> drivers/clk/mmp/clk-pxa1908-apmu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
This one might be actually correct (in other cases you were blindly
copying some code like returning -ENOMEM while code expects NULL).
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
Best regards,
Krzysztof