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

Commit ec29ea54 authored by Eric Paris's avatar Eric Paris Committed by Al Viro
Browse files

ima: valid return code from ima_inode_alloc



ima_inode_alloc returns 0 and 1, but the LSM hooks expects an errno.

Signed-off-by: default avatarEric Paris <eparis@redhat.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent e81e3f4d
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -87,8 +87,6 @@ struct ima_iint_cache *ima_iint_insert(struct inode *inode)
/**
 * ima_inode_alloc - allocate an iint associated with an inode
 * @inode: pointer to the inode
 *
 * Return 0 on success, 1 on failure.
 */
int ima_inode_alloc(struct inode *inode)
{
@@ -99,7 +97,7 @@ int ima_inode_alloc(struct inode *inode)

	iint = ima_iint_insert(inode);
	if (!iint)
		return 1;
		return -ENOMEM;
	return 0;
}