Linux-Fsdevel Archive on
help / color / mirror / Atom feed
From: Julia Lawall <>
To: Pascal Bouchareine <>
Cc:, Alexander Viro <>,,
Subject: [PATCH] proc,fcntl: fix ifnullfree.cocci warnings
Date: Mon, 27 Jul 2020 12:42:15 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.2007271241000.3288@hadrien> (raw)

From: kernel test robot <>

NULL check before kfree is not needed.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

CC: Pascal Bouchareine <>
Signed-off-by: kernel test robot <>
Signed-off-by: Julia Lawall <>

head:   56b3babdfa5600eeed065807fd6e80d150b1766b
commit: 56b3babdfa5600eeed065807fd6e80d150b1766b [1/1] proc,fcntl: introduce F_SET_DESCRIPTION
:::::: branch date: 27 hours ago
:::::: commit date: 27 hours ago

Please take the patch only if it's a positive warning. Thanks!

 file_table.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -272,8 +272,7 @@ static void __fput(struct file *file)

-	if (file->f_description)
-		kfree(file->f_description);
+	kfree(file->f_description);

 	if (unlikely(file->f_flags & FASYNC)) {

                 reply	other threads:[~2020-07-27 10:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.2007271241000.3288@hadrien \ \ \ \ \ \ \
    --subject='Re: [PATCH] proc,fcntl: fix ifnullfree.cocci warnings' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).