Skip to content

Commit

Permalink
Input: lightning - return proper error codes from l4_init()
Browse files Browse the repository at this point in the history
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Akinobu Mita authored and Dmitry Torokhov committed Nov 3, 2006
1 parent 1447190 commit 6a89bc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/input/gameport/lightning.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -319,7 +319,7 @@ static int __init l4_init(void)

if (!cards) {
release_region(L4_PORT, 1);
return -1;
return -ENODEV;
}

return 0;
Expand Down

0 comments on commit 6a89bc0

Please sign in to comment.