Re: [PATCH] cleanup: Suggest using IS_ERR_OR_NULL() in cleanup functions

From: Dan Carpenter

Date: Thu Nov 19 2026 - 08:17:00 EST


On Thu, Nov 19, 2026 at 02:14:29PM +0100, Geert Uytterhoeven wrote:
> Commit cd7eb8f83fcf258f ("mm/slab: make __free(kfree) accept error
> pointers") already hardened the cleanup functions for kfree() and
> kvfree().
>
> Update the recommendation and example in the documentation, too.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

Acked-by: Dan Carpenter <error27@xxxxxxxxx>

regards,
dan carpenter