efivarfs: Return a consistent error when efivarfs_get_inode() fails
authorMatt Fleming <matt.fleming@intel.com>
Tue, 23 Oct 2012 11:41:03 +0000 (12:41 +0100)
committerMatt Fleming <matt.fleming@intel.com>
Tue, 30 Oct 2012 10:39:28 +0000 (10:39 +0000)
commitaeeaa8d46aa38c9cc5fac23feb9b1f91bdbf5dd3
tree1072c7445eb10b5a9b417c2eabfb6fa8746ed06c
parent07b1c5bc64cff9c880261a1fef562ef7ea7f6575
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>
drivers/firmware/efivars.c