From: Fabian Frederick <f...@skynet.be>

commit 6e6870d4fd19e25332e7d975604497c8568949d9 upstream

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

Signed-off-by: Fabian Frederick <f...@skynet.be>
Signed-off-by: Andrew Morton <a...@linux-foundation.org>
Signed-off-by: Linus Torvalds <torva...@linux-foundation.org>
Signed-off-by: Yang Shi <yang....@windriver.com>
---
 fs/hugetlbfs/inode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index cc81d25..1e2872b 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -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;
 }
-- 
2.0.2

-- 
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to