[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1338704660-30921-1-git-send-email-devendra.aaru@gmail.com>
Date: Sun, 3 Jun 2012 11:54:19 +0530
From: Devendra Naga <devendra.aaru@...il.com>
To: Alessandro Zummo <a.zummo@...ertech.it>,
rtc-linux@...glegroups.com, linux-kernel@...r.kernel.org
Cc: Devendra Naga <devendra.aaru@...il.com>
Subject: [PATCH] rtc/rtc-spear: free the config right after the rtc_device_unregister
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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists