summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorChethan Krishna N <chethan.krishna@stericsson.com>2011-07-06 12:30:13 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:03:34 +0200
commitca05ccfea38ea02998c6392ed3180a720e4f449d (patch)
tree65b9a147ef3a45ec1acb6382c7673bdb28528859 /drivers/input
parent01a4f7f188ea3d622212ed0848164a396e4821ae (diff)
db5500_keypad: check return values from all calls
checking if NULL is returned from any call of platform_get_resource function. ST-Ericsson ID: 348573 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: Not tested Change-Id: I9e26e30cf075d6a5d85a23306d6c85212a20cc40 Signed-off-by: Chethan Krishna N <chethan.krishna@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/26641 Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/29580 Reviewed-by: Naga RADHESH Y <naga.radheshy@stericsson.com> Tested-by: Naga RADHESH Y <naga.radheshy@stericsson.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/db5500_keypad.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/keyboard/db5500_keypad.c b/drivers/input/keyboard/db5500_keypad.c
index a53d72e8ab4..8ef1bd43b7f 100644
--- a/drivers/input/keyboard/db5500_keypad.c
+++ b/drivers/input/keyboard/db5500_keypad.c
@@ -427,7 +427,10 @@ static int __devexit db5500_keypad_remove(struct platform_device *pdev)
clk_put(keypad->clk);
iounmap(keypad->base);
- release_mem_region(res->start, resource_size(res));
+
+ if (res)
+ release_mem_region(res->start, resource_size(res));
+
kfree(keypad);
return 0;