Skip to content

Commit

Permalink
fs/hugetlbfs/inode.c: remove null test before kfree
Browse files Browse the repository at this point in the history
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Fabian Frederick authored and Linus Torvalds committed Jun 4, 2014
1 parent be1d2cf commit 6e6870d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/hugetlbfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,8 +901,7 @@ hugetlbfs_fill_super(struct super_block *sb, void *data, int silent)
goto out_free;
return 0;
out_free:
if (sbinfo->spool)
kfree(sbinfo->spool);
kfree(sbinfo->spool);
kfree(sbinfo);
return -ENOMEM;
}
Expand Down

0 comments on commit 6e6870d

Please sign in to comment.