Skip to contentSkip to conversation

Input: Fix cleaning up KEY_STROBEs after error in tosakbd_probe()

PATCH Applied Roel Kluin 2 participants 2 messages Aug 21, 2009

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 Input: Fix cleaning up KEY_STROBEs after error in tosakbd_probe()

Direct to fail2 to gpio_free() the KEY_STROBEs as well as the KEY_SENSEs.

---
Or is there an obscure reason why this shouldn't happen?

drivers/input/keyboard/tosakbd.c +2 -2
index 677276b..72c06ef 100644
@@ -344,7 +344,7 @@ static int __devinit tosakbd_probe(struct platform_device *pdev) {
 				" direction for GPIO %d, error %d\n",
 				gpio, error);
 			gpio_free(gpio);
-			goto fail;
+			goto fail2;
 		}
 
 	}
@@ -353,7 +353,7 @@ static int __devinit tosakbd_probe(struct platform_device *pdev) {
 	if (error) {
 		printk(KERN_ERR "tosakbd: Unable to register input device, "
 			"error: %d\n", error);
-		goto fail;
+		goto fail2;
 	}
 
 	printk(KERN_INFO "input: Tosa Keyboard Registered\n");