Skip to contentSkip to conversation

lightning: return proper return code

PATCH New Akinobu Mita 1 participant 1 message Oct 28, 2006 Input drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lightning: return proper return code

This patch makes module init return proper value instead of -1 (-EPERM).

Cc Dmitry Torokhov <[email protected]>
 drivers/input/gameport/lightning.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/input/gameport/lightning.c +2 -2
Index: work-fault-inject/drivers/input/gameport/lightning.c
===================================================================
@@ -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)
@@ -319,7 +319,7 @@ static int __init l4_init(void)
 
 	if (!cards) {
 		release_region(L4_PORT, 1);
-		return -1;
+		return -ENODEV;
 	}
 
 	return 0;