Re: [PATCH] clk: mmp: Fix NULL vs IS_ERR() check

Krzysztof Kozlowski
2025-03-07T11:18:09Z

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@inspur.com>
> ---
> 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@linaro.org>

Best regards,
Krzysztof