Skip to content

Commit

Permalink
fs/jffs2/acl.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

Cc: David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
  • Loading branch information
Fabian Frederick authored and computersforpeace committed Jul 2, 2014
1 parent da90c4e commit b6861d0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/jffs2/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@ struct posix_acl *jffs2_get_acl(struct inode *inode, int type)
} else {
acl = ERR_PTR(rc);
}
if (value)
kfree(value);
kfree(value);
if (!IS_ERR(acl))
set_cached_acl(inode, type, acl);
return acl;
Expand Down

0 comments on commit b6861d0

Please sign in to comment.