Input: lightning - return proper error codes from l4_init()
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
1447190e39
commit
6a89bc0004
1 changed files with 2 additions and 2 deletions
|
@ -309,7 +309,7 @@ static int __init l4_init(void)
|
||||||
int i, cards = 0;
|
int i, cards = 0;
|
||||||
|
|
||||||
if (!request_region(L4_PORT, 1, "lightning"))
|
if (!request_region(L4_PORT, 1, "lightning"))
|
||||||
return -1;
|
return -EBUSY;
|
||||||
|
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
if (l4_add_card(i) == 0)
|
if (l4_add_card(i) == 0)
|
||||||
|
@ -319,7 +319,7 @@ static int __init l4_init(void)
|
||||||
|
|
||||||
if (!cards) {
|
if (!cards) {
|
||||||
release_region(L4_PORT, 1);
|
release_region(L4_PORT, 1);
|
||||||
return -1;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue