]> www.infradead.org Git - users/hch/misc.git/commit
nfs: Remove unnecessary NULL check before kfree()
authorThorsten Blum <thorsten.blum@toblux.com>
Sun, 1 Sep 2024 16:19:13 +0000 (18:19 +0200)
committerAnna Schumaker <anna.schumaker@oracle.com>
Mon, 23 Sep 2024 19:03:12 +0000 (15:03 -0400)
commite343678ee990912a132e94236fe028efe78696b0
tree24ebff1419c99b02a41e83146422f8a449019154
parentbb8e4ce500cb09950c2b51a3be0e94e337a215aa
nfs: Remove unnecessary NULL check before kfree()

Since kfree() already checks if its argument is NULL, an additional
check before calling kfree() is unnecessary and can be removed.

Remove it and thus also the following Coccinelle/coccicheck warning
reported by ifnullfree.cocci:

  WARNING: NULL check before some freeing functions is not needed

Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
fs/nfs/read.c