Skip to content

Commit

Permalink
input/atari: Fix atarimouse init
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
  • Loading branch information
Michael Schmitz authored and geertu committed May 19, 2011
1 parent 7786908 commit 186f200
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions drivers/input/keyboard/atakbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions drivers/input/mouse/atarimouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 186f200

Please sign in to comment.