瀏覽代碼

fs/jffs2/acl.c: remove null test before kfree

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>
Fabian Frederick 11 年之前
父節點
當前提交
b6861d0a15
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      fs/jffs2/acl.c

+ 1 - 2
fs/jffs2/acl.c

@@ -202,8 +202,7 @@ struct posix_acl *jffs2_get_acl(struct inode *inode, int type)
 	} else {
 	} else {
 		acl = ERR_PTR(rc);
 		acl = ERR_PTR(rc);
 	}
 	}
-	if (value)
-		kfree(value);
+	kfree(value);
 	if (!IS_ERR(acl))
 	if (!IS_ERR(acl))
 		set_cached_acl(inode, type, acl);
 		set_cached_acl(inode, type, acl);
 	return acl;
 	return acl;