]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
input/atari: Fix atarimouse init
authorMichael Schmitz <schmitz@biophys.uni-duesseldorf.de>
Sun, 28 Dec 2008 22:00:45 +0000 (23:00 +0100)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 19 May 2011 16:19:11 +0000 (18:19 +0200)
Atarimouse fails to load as a module (with ENODEV), due to a brown paper
bag bug, misinterpreting the semantics of atari_keyb_init().

[geert] Propagate the return value of atari_keyb_init() everywhere

Signed-off-by: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
drivers/input/keyboard/atakbd.c
drivers/input/mouse/atarimouse.c

index 1839194ea98787ff9fb82f810c18fb4a8bdb893d..10bcd4ae54023a39bf7030546e1349780bef8ec5 100644 (file)
@@ -223,8 +223,9 @@ static int __init atakbd_init(void)
                return -ENODEV;
 
        // need to init core driver if not already done so
-       if (atari_keyb_init())
-               return -ENODEV;
+       error = atari_keyb_init();
+       if (error)
+               return error;
 
        atakbd_dev = input_allocate_device();
        if (!atakbd_dev)
index a57143ce80b5227ae8c8757351476da9581ce38f..16a9d0ffab8afcd3a738db152f6a9ebb4485b40a 100644 (file)
@@ -118,8 +118,9 @@ static int __init atamouse_init(void)
        if (!MACH_IS_ATARI || !ATARIHW_PRESENT(ST_MFP))
                return -ENODEV;
 
-       if (!atari_keyb_init())
-               return -ENODEV;
+       error = atari_keyb_init();
+       if (error)
+               return error;
 
        atamouse_dev = input_allocate_device();
        if (!atamouse_dev)