Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 259692bd authored by Jesper Juhl's avatar Jesper Juhl Committed by Dave Kleikamp
Browse files

JFS: Remove redundant kfree() NULL pointer checks



kfree() can handle a NULL pointer, don't worry about passing it one. 

Signed-off-by: default avatarJesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: default avatarDave Kleikamp <shaggy@austin.ibm.com>
parent 6f817abc
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -70,7 +70,6 @@ static struct posix_acl *jfs_get_acl(struct inode *inode, int type)
		if (!IS_ERR(acl))
			*p_acl = posix_acl_dup(acl);
	}
	if (value)
	kfree(value);
	return acl;
}
@@ -112,7 +111,6 @@ static int jfs_set_acl(struct inode *inode, int type, struct posix_acl *acl)
	}
	rc = __jfs_setxattr(inode, ea_name, value, size, 0);
out:
	if (value)
	kfree(value);

	if (!rc) {
+2 −4
Original line number Diff line number Diff line
@@ -946,7 +946,6 @@ int __jfs_setxattr(struct inode *inode, const char *name, const void *value,
      out:
	up_write(&JFS_IP(inode)->xattr_sem);

	if (os2name)
	kfree(os2name);

	return rc;
@@ -1042,7 +1041,6 @@ ssize_t __jfs_getxattr(struct inode *inode, const char *name, void *data,
      out:
	up_read(&JFS_IP(inode)->xattr_sem);

	if (os2name)
	kfree(os2name);

	return size;