Commit 186f200a authored by Michael Schmitz's avatar Michael Schmitz Committed by Geert Uytterhoeven

input/atari: Fix atarimouse init

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: default avatarMichael Schmitz <schmitz@debian.org>
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent 7786908c
...@@ -223,8 +223,9 @@ static int __init atakbd_init(void) ...@@ -223,8 +223,9 @@ static int __init atakbd_init(void)
return -ENODEV; return -ENODEV;
// need to init core driver if not already done so // need to init core driver if not already done so
if (atari_keyb_init()) error = atari_keyb_init();
return -ENODEV; if (error)
return error;
atakbd_dev = input_allocate_device(); atakbd_dev = input_allocate_device();
if (!atakbd_dev) if (!atakbd_dev)
......
...@@ -118,8 +118,9 @@ static int __init atamouse_init(void) ...@@ -118,8 +118,9 @@ static int __init atamouse_init(void)
if (!MACH_IS_ATARI || !ATARIHW_PRESENT(ST_MFP)) if (!MACH_IS_ATARI || !ATARIHW_PRESENT(ST_MFP))
return -ENODEV; return -ENODEV;
if (!atari_keyb_init()) error = atari_keyb_init();
return -ENODEV; if (error)
return error;
atamouse_dev = input_allocate_device(); atamouse_dev = input_allocate_device();
if (!atamouse_dev) if (!atamouse_dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment