From: Axel Lin on
Return -ENOMEM instead of -EINVAL in case of failed rfkill_alloc()

Signed-off-by: Axel Lin <axel.lin(a)gmail.com>
---
drivers/platform/x86/asus-laptop.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/asus-laptop.c
b/drivers/platform/x86/asus-laptop.c
index db5f7db..21dbe38 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -1094,7 +1094,7 @@ static int asus_rfkill_init(struct asus_laptop *asus)
RFKILL_TYPE_GPS,
&asus_gps_rfkill_ops, NULL);
if (!asus->gps_rfkill)
- return -EINVAL;
+ return -ENOMEM;

result = rfkill_register(asus->gps_rfkill);
if (result) {
--
1.5.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/