From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> kfree() already accepts and silently ignores NULL-pointers, there's no need to check it when running the auto cleanup routine. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> --- include/linux/slab.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/slab.h b/include/linux/slab.h index 8228d1276a2f..fb709ed506ba 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -228,7 +228,7 @@ void kfree(const void *objp); void kfree_sensitive(const void *objp); size_t __ksize(const void *objp); -DEFINE_FREE(kfree, void *, if (_T) kfree(_T)) +DEFINE_FREE(kfree, void *, kfree(_T)) /** * ksize - Report actual allocation size of associated object -- 2.39.2