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: Eric Paris <eparis@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Eric Paris 2009-12-04 15:47:44 -05:00 committed by Al Viro
parent e81e3f4dca
commit ec29ea544b

View file

@ -87,8 +87,6 @@ out:
/**
* 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;
}