Input: lightning - return proper error codes from l4_init()
authorAkinobu Mita <akinobu.mita@gmail.com>
Fri, 3 Nov 2006 04:27:11 +0000 (23:27 -0500)
committerDmitry Torokhov <dtor@insightbb.com>
Fri, 3 Nov 2006 04:27:11 +0000 (23:27 -0500)
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/gameport/lightning.c

index d65d81080257ef6355a913d49fe39f8b9075d8a6..6b4d4561d465bb133cb33d688c5fc4a4036f0de3 100644 (file)
@@ -309,7 +309,7 @@ static int __init l4_init(void)
        int i, cards = 0;
 
        if (!request_region(L4_PORT, 1, "lightning"))
-               return -1;
+               return -EBUSY;
 
        for (i = 0; i < 2; i++)
                if (l4_add_card(i) == 0)
@@ -319,7 +319,7 @@ static int __init l4_init(void)
 
        if (!cards) {
                release_region(L4_PORT, 1);
-               return -1;
+               return -ENODEV;
        }
 
        return 0;