From: kbuild test robot <fengguang.wu@xxxxxxxxx> fs/9p/v9fs.c:318: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. fs/9p/v9fs.c:320: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 Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx> Signed-off-by: Eduard Shishkin <eduard.shishkin@xxxxxxxxxx> --- fs/9p/v9fs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index 3b49daf..e2f84a6 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c @@ -314,10 +314,8 @@ void put_flush_set(struct v9fs_flush_set *fset) { if (!fset) return; - if (fset->pages) - kfree(fset->pages); - if (fset->buf) - kfree(fset->buf); + kfree(fset->pages); + kfree(fset->buf); kfree(fset); } -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html