* [vfs:orangefs 94/118] fs/orangefs/orangefs-debugfs.c:130:2-26: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.
@ 2016-03-26 18:54 kbuild test robot
2016-03-26 18:54 ` [PATCH] Orangefs: fix ifnullfree.cocci warnings kbuild test robot
0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2016-03-26 18:54 UTC (permalink / raw)
To: Mike Marshall; +Cc: kbuild-all, linux-fsdevel
tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git orangefs
head: 45996492e5c85aa0ac93a95d1b2d1ed56851c865
commit: 2180c52cc72993b3b097573aaa550f273f795c8a [94/118] Orangefs: fix sloppy cleanups of debugfs and sysfs init failures.
coccinelle warnings: (new ones prefixed by >>)
>> fs/orangefs/orangefs-debugfs.c:130:2-26: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Orangefs: fix ifnullfree.cocci warnings
2016-03-26 18:54 [vfs:orangefs 94/118] fs/orangefs/orangefs-debugfs.c:130:2-26: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values kbuild test robot
@ 2016-03-26 18:54 ` kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2016-03-26 18:54 UTC (permalink / raw)
To: Mike Marshall; +Cc: kbuild-all, linux-fsdevel, pvfs2-developers, linux-kernel
fs/orangefs/orangefs-debugfs.c:130:2-26: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.
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
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
orangefs-debugfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/fs/orangefs/orangefs-debugfs.c
+++ b/fs/orangefs/orangefs-debugfs.c
@@ -126,8 +126,7 @@ out:
void orangefs_debugfs_cleanup(void)
{
- if (debug_dir)
- debugfs_remove_recursive(debug_dir);
+ debugfs_remove_recursive(debug_dir);
}
/* open ORANGEFS_KMOD_DEBUG_HELP_FILE */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-26 18:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-26 18:54 [vfs:orangefs 94/118] fs/orangefs/orangefs-debugfs.c:130:2-26: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values kbuild test robot
2016-03-26 18:54 ` [PATCH] Orangefs: fix ifnullfree.cocci warnings kbuild test robot
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).