summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaga Radhesh <naga.radheshy@stericsson.com>2012-01-19 11:58:06 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:03:39 +0200
commit961a50cea677e23992aa0fc49ed33f50779ea328 (patch)
tree7d9568c0fcae80772b59605f93c6dea8efe45208
parentdb59ae830656e3c87f0ace7edbade0a684ca2c7d (diff)
nomadik-ske-keypad: dereference ptr before free
Pointer dereferenced before it is freed, so free the clk properly and remove duplicate freeing of gpio as it is already freed during exit call. ST-Ericsson ID: 401383 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: Trivial Change-Id:I5b1b2c8e6161bad1b813da7cf666de2c59fbb7d9 Signed-off-by: Naga Radhesh <naga.radheshy@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/41568 Reviewed-by: Anil KUMAR (STE) <anil.kumar@stericsson.com> Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Naveen Kumar GADDIPATI <naveen.gaddipati@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
-rw-r--r--drivers/input/keyboard/nomadik-ske-keypad.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c
index 022b474e7ec..5bc91685f90 100644
--- a/drivers/input/keyboard/nomadik-ske-keypad.c
+++ b/drivers/input/keyboard/nomadik-ske-keypad.c
@@ -741,7 +741,7 @@ out_regulator_get:
out_freekeypad:
kfree(keypad);
out_freeclk:
- clk_put(keypad->clk);
+ clk_put(clk);
out_freeioremap:
iounmap(reg_base);
out_freerequest_memregions:
@@ -776,9 +776,6 @@ static int __devexit ske_keypad_remove(struct platform_device *pdev)
for (i = 0; i < keypad->board->krow; i++)
free_irq(keypad->gpio_input_irq[i], keypad);
- for (i = 0; i < SKE_KPD_MAX_ROWS; i++)
- gpio_free(keypad->ske_rows[i]);
-
free_irq(keypad->irq, keypad);
regulator_put(keypad->regulator);