[PATCH 1/1] fs/btrfs/free-space-cache.c: remove null test before kfree

From: Fabian Frederick
Date: Mon Jun 16 2014 - 13:56:56 EST


Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Chris Mason <clm@xxxxxx>
Cc: Josef Bacik <jbacik@xxxxxx>
Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
---
fs/btrfs/free-space-cache.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 372b05f..c8211ae 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -1884,8 +1884,7 @@ new_bitmap:

out:
if (info) {
- if (info->bitmap)
- kfree(info->bitmap);
+ kfree(info->bitmap);
kmem_cache_free(btrfs_free_space_cachep, info);
}

@@ -3126,8 +3125,7 @@ again:
if (bytes)
goto again;

- if (map)
- kfree(map);
+ kfree(map);
return 0;
}

--
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/