diff options
author | Matt Fleming <matt.fleming@intel.com> | 2012-10-23 07:41:03 -0400 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2012-10-30 06:39:28 -0400 |
commit | aeeaa8d46aa38c9cc5fac23feb9b1f91bdbf5dd3 (patch) | |
tree | 1072c7445eb10b5a9b417c2eabfb6fa8746ed06c /drivers/firmware/efivars.c | |
parent | 07b1c5bc64cff9c880261a1fef562ef7ea7f6575 (diff) |
efivarfs: Return a consistent error when efivarfs_get_inode() fails
Instead of returning -ENOSPC if efivarfs_get_inode() fails we should
be returning -ENOMEM, since running out of memory is the only reason
it can fail. Furthermore, that's the error value used everywhere else
in this file. It's also less likely to confuse users that hit this
error case.
Acked-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'drivers/firmware/efivars.c')
-rw-r--r-- | drivers/firmware/efivars.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index 6a858d1a5bb3..58cec627a821 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c | |||
@@ -911,7 +911,7 @@ static int efivarfs_create(struct inode *dir, struct dentry *dentry, | |||
911 | 911 | ||
912 | inode = efivarfs_get_inode(dir->i_sb, dir, mode, 0); | 912 | inode = efivarfs_get_inode(dir->i_sb, dir, mode, 0); |
913 | if (!inode) | 913 | if (!inode) |
914 | return -ENOSPC; | 914 | return -ENOMEM; |
915 | 915 | ||
916 | var = kzalloc(sizeof(struct efivar_entry), GFP_KERNEL); | 916 | var = kzalloc(sizeof(struct efivar_entry), GFP_KERNEL); |
917 | if (!var) { | 917 | if (!var) { |