Messages in this thread Patch in this message | | | From | Devendra Naga <> | Subject | [PATCH] rtc/rtc-spear: free the config right after the rtc_device_unregister | Date | Sun, 3 Jun 2012 11:54:19 +0530 |
| |
the config was freed and its used again at rtc_device_unregister which leads to a kernel panic. so, do it right after the rtc_device_unregister
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> --- drivers/rtc/rtc-spear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c index 1f76320..e278547 100644 --- a/drivers/rtc/rtc-spear.c +++ b/drivers/rtc/rtc-spear.c @@ -458,12 +458,12 @@ static int __devexit spear_rtc_remove(struct platform_device *pdev) clk_disable(config->clk); clk_put(config->clk); iounmap(config->ioaddr); - kfree(config); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (res) release_mem_region(res->start, resource_size(res)); platform_set_drvdata(pdev, NULL); rtc_device_unregister(config->rtc); + kfree(config); return 0; } -- 1.7.9.5
| |