提交 186f200a 编写于 作者: M Michael Schmitz 提交者: 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: NMichael Schmitz <schmitz@debian.org>
Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
上级 7786908c
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册