diff options
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/db5500_keypad.c | 5 |
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; |