]> git.baikalelectronics.ru Git - kernel.git/commit
rtc-mxc: multiple fixes in rtc-mxc probe method
authorVladimir Zapolskiy <vzapolskiy@gmail.com>
Tue, 6 Apr 2010 21:35:07 +0000 (14:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Apr 2010 15:38:05 +0000 (08:38 -0700)
commitb140c63cd89868aac8d0044b84df4663163ae419
treea2276c69020c6600112371023d401fa40f83168b
parent31996734fa738e266b5c2f2c32bd74d329099cf0
rtc-mxc: multiple fixes in rtc-mxc probe method

On exit paths in mxc_rtc_probe() method some resources are not freed
correctly.

This patch fixes:
* unrequested memory region containing imx RTC registers
* iounmap() isn't called on exit_free_pdata branch
* clock get rate is called for freed clock source
* clock isn't disabled on exit_put_clk branch

To simplify the fix managed device resources are used.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-mxc.c