aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/keyboard/twl4030_keypad.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c
index fb16b5e5ea13..09bef79d9da1 100644
--- a/drivers/input/keyboard/twl4030_keypad.c
+++ b/drivers/input/keyboard/twl4030_keypad.c
@@ -406,23 +406,22 @@ static int __devinit twl4030_kp_probe(struct platform_device *pdev)
406 if (error) { 406 if (error) {
407 dev_info(kp->dbg_dev, "request_irq failed for irq no=%d\n", 407 dev_info(kp->dbg_dev, "request_irq failed for irq no=%d\n",
408 kp->irq); 408 kp->irq);
409 goto err3; 409 goto err2;
410 } 410 }
411 411
412 /* Enable KP and TO interrupts now. */ 412 /* Enable KP and TO interrupts now. */
413 reg = (u8) ~(KEYP_IMR1_KP | KEYP_IMR1_TO); 413 reg = (u8) ~(KEYP_IMR1_KP | KEYP_IMR1_TO);
414 if (twl4030_kpwrite_u8(kp, reg, KEYP_IMR1)) { 414 if (twl4030_kpwrite_u8(kp, reg, KEYP_IMR1)) {
415 error = -EIO; 415 error = -EIO;
416 goto err4; 416 goto err3;
417 } 417 }
418 418
419 platform_set_drvdata(pdev, kp); 419 platform_set_drvdata(pdev, kp);
420 return 0; 420 return 0;
421 421
422err4: 422err3:
423 /* mask all events - we don't care about the result */ 423 /* mask all events - we don't care about the result */
424 (void) twl4030_kpwrite_u8(kp, 0xff, KEYP_IMR1); 424 (void) twl4030_kpwrite_u8(kp, 0xff, KEYP_IMR1);
425err3:
426 free_irq(kp->irq, NULL); 425 free_irq(kp->irq, NULL);
427err2: 426err2:
428 input_unregister_device(input); 427 input_unregister_device(input);