summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-19 17:10:57 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-19 17:10:57 -0700
commit5bfec46baa3a752393433b8d89d3b2c70820f61d (patch)
tree62bcf1a1e43de6cb1721feb1861bdf7ee70007ff
parent6fa0fddd5f60064f22f8d389f5aeb7dd1646dfe1 (diff)
parentfdb19a6cb48407c59a2007063f4005c9384603c3 (diff)
downloadop-kernel-dev-5bfec46baa3a752393433b8d89d3b2c70820f61d.zip
op-kernel-dev-5bfec46baa3a752393433b8d89d3b2c70820f61d.tar.gz
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: cs5535-clockevt: Free timer in IRQ setup error path
-rw-r--r--drivers/clocksource/cs5535-clockevt.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/clocksource/cs5535-clockevt.c b/drivers/clocksource/cs5535-clockevt.c
index b314a99..d7be69f13 100644
--- a/drivers/clocksource/cs5535-clockevt.c
+++ b/drivers/clocksource/cs5535-clockevt.c
@@ -154,14 +154,14 @@ static int __init cs5535_mfgpt_init(void)
if (cs5535_mfgpt_setup_irq(timer, MFGPT_CMP2, &timer_irq)) {
printk(KERN_ERR DRV_NAME ": Could not set up IRQ %d\n",
timer_irq);
- return -EIO;
+ goto err_timer;
}
/* And register it with the kernel */
ret = setup_irq(timer_irq, &mfgptirq);
if (ret) {
printk(KERN_ERR DRV_NAME ": Unable to set up the interrupt.\n");
- goto err;
+ goto err_irq;
}
/* Set the clock scale and enable the event mode for CMP2 */
@@ -184,8 +184,10 @@ static int __init cs5535_mfgpt_init(void)
return 0;
-err:
+err_irq:
cs5535_mfgpt_release_irq(cs5535_event_clock, MFGPT_CMP2, &timer_irq);
+err_timer:
+ cs5535_mfgpt_free_timer(cs5535_event_clock);
printk(KERN_ERR DRV_NAME ": Unable to set up the MFGPT clock source\n");
return -EIO;
}
OpenPOWER on IntegriCloud