diff mbox

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

Message ID 4A8EA9B8.2090302@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Roel Kluin Aug. 21, 2009, 2:05 p.m. UTC
Direct to fail2 to gpio_free() the KEY_STROBEs as well as the KEY_SENSEs.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Or is there an obscure reason why this shouldn't happen?

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Dmitry Torokhov Aug. 21, 2009, 4:12 p.m. UTC | #1
On Fri, Aug 21, 2009 at 04:05:44PM +0200, Roel Kluin wrote:
> Direct to fail2 to gpio_free() the KEY_STROBEs as well as the KEY_SENSEs.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>

Applied, thank you Roel.
diff mbox

Patch

diff --git a/drivers/input/keyboard/tosakbd.c b/drivers/input/keyboard/tosakbd.c
index 677276b..72c06ef 100644
--- a/drivers/input/keyboard/tosakbd.c
+++ b/drivers/input/keyboard/tosakbd.c
@@ -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");