rtc/rtc-spear: free the config right after the rtc_device_unregister
PATCH 1/1 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
--- drivers/rtc/rtc-spear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-spear.c +1 -1
@@ -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 ; }
Signature · 1 line
1.7.9.5
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Viresh,
Quoted 1 line · Viresh Kumar
Reviewed-by Viresh Kumar <[email protected]>
Thanks, at last :-).
Is there any tree through which it can reach torvalds?
Thanks,
Devendra.
Quoted 6 lines · devendra.aaru
Quoted 1 line · Viresh Kumar
Reviewed-by Viresh Kumar <[email protected]>Thanks, at last :-).
Is there any tree through which it can reach torvalds?
The way I would have found this information about any driver is by looking at its
git-log and check via which path patches have been going till date. Maintainers normally adds there signed-off's to patches that go through them.
Andrew Morton, is the one who applied rtc-spear patches till now. Added in cc.
--
viresh
Hi Viresh,
Quoted 6 lines · viresh kumar
Quoted 5 lines · devendra.aaru
Quoted 1 line · Viresh Kumar
Reviewed-by Viresh Kumar <[email protected]>Thanks, at last :-).
Quoted 9 lines
Quoted 1 line
Is there any tree through which it can reach torvalds?
The way I would have found this information about any driver is by looking at its
git-log and check via which path patches have been going till date. Maintainers normally adds there signed-off's to patches that go through them.Andrew Morton, is the one who applied rtc-spear patches till now. Added in cc.
Thanks a lot for the information.
Quoted 2 lines
--
viresh
Devendra.