]> git.karo-electronics.de Git - karo-tx-linux.git/commit
btrfs: fix ifnullfree.cocci warnings
authorkbuild test robot <fengguang.wu@intel.com>
Wed, 17 Feb 2016 11:04:41 +0000 (19:04 +0800)
committerDavid Sterba <dsterba@suse.com>
Fri, 26 Feb 2016 14:04:55 +0000 (15:04 +0100)
commit33c91c07d86b3e1af1ffa6862c49222e15a0d534
tree285264260698e83cc86921e6dc1ba41798d8eb32
parent42841f24ecb12cc7a55ac2c259c60b67e8a95251
btrfs: fix ifnullfree.cocci warnings

fs/btrfs/volumes.c:1886:2-7: 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

CC: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c