From: Julia Lawall <julia.lawall@lip6.fr>
To: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Anna Schumaker <anna.schumaker@netapp.com>,
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-nfs@vger.kernel.org, kbuild-all@01.org
Subject: [PATCH] NFS: fix ifnullfree.cocci warnings
Date: Sun, 7 Jul 2019 18:45:38 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.1907071844310.2521@hadrien> (raw)
From: kbuild test robot <lkp@intel.com>
fs/nfs/sysfs.c:125:2-7: WARNING: NULL check before some freeing functions is not needed.
NULL check before some freeing functions is not needed.
Based on checkpatch warning
"kfree(NULL) is safe this check is probably not required"
and kfreeaddr.cocci by Julia Lawall.
Generated by: scripts/coccinelle/free/ifnullfree.cocci
Fixes: bf11fbdb20b3 ("NFS: Add sysfs support for per-container identifier")
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---
tree: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
head: c433a7975cfc839906aaa891f68d86ca228f7e43
commit: bf11fbdb20b385157b046ea7781f04d0c62554a3 [30/57] NFS: Add sysfs support for per-container identifier
:::::: branch date: 22 hours ago
:::::: commit date: 22 hours ago
Please take the patch only if it's a positive warning. Thanks!
sysfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/fs/nfs/sysfs.c
+++ b/fs/nfs/sysfs.c
@@ -121,8 +121,7 @@ static void nfs_netns_client_release(str
struct nfs_netns_client,
kobject);
- if (c->identifier)
- kfree(c->identifier);
+ kfree(c->identifier);
kfree(c);
}
reply other threads:[~2019-07-07 16:45 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* 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.1907071844310.2521@hadrien \
--to=julia.lawall@lip6.fr \
--cc=anna.schumaker@netapp.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®