Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drivers/rtc/rtc-s3c.c: fix driver clock enable/disable balance issues

If an error occurs after the clock is enabled, the enable/disable state
can become unbalanced.

Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Jonghwan Choi and committed by
Linus Torvalds
2dbcd05f 1de8ad43

+1 -1
+1 -1
drivers/rtc/rtc-s3c.c
··· 202 202 void __iomem *base = s3c_rtc_base; 203 203 int year = tm->tm_year - 100; 204 204 205 - clk_enable(rtc_clk); 206 205 pr_debug("set time %04d.%02d.%02d %02d:%02d:%02d\n", 207 206 1900 + tm->tm_year, tm->tm_mon, tm->tm_mday, 208 207 tm->tm_hour, tm->tm_min, tm->tm_sec); ··· 213 214 return -EINVAL; 214 215 } 215 216 217 + clk_enable(rtc_clk); 216 218 writeb(bin2bcd(tm->tm_sec), base + S3C2410_RTCSEC); 217 219 writeb(bin2bcd(tm->tm_min), base + S3C2410_RTCMIN); 218 220 writeb(bin2bcd(tm->tm_hour), base + S3C2410_RTCHOUR);