Skip to content

Commit 5bfec46

Browse files
committed
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
2 parents 6fa0fdd + fdb19a6 commit 5bfec46

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎drivers/clocksource/cs5535-clockevt.c‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@ static int __init cs5535_mfgpt_init(void)
154154
if (cs5535_mfgpt_setup_irq(timer, MFGPT_CMP2, &timer_irq)) {
155155
printk(KERN_ERR DRV_NAME ": Could not set up IRQ %d\n",
156156
timer_irq);
157-
return -EIO;
157+
goto err_timer;
158158
}
159159

160160
/* And register it with the kernel */
161161
ret = setup_irq(timer_irq, &mfgptirq);
162162
if (ret) {
163163
printk(KERN_ERR DRV_NAME ": Unable to set up the interrupt.\n");
164-
goto err;
164+
goto err_irq;
165165
}
166166

167167
/* Set the clock scale and enable the event mode for CMP2 */
@@ -184,8 +184,10 @@ static int __init cs5535_mfgpt_init(void)
184184

185185
return 0;
186186

187-
err:
187+
err_irq:
188188
cs5535_mfgpt_release_irq(cs5535_event_clock, MFGPT_CMP2, &timer_irq);
189+
err_timer:
190+
cs5535_mfgpt_free_timer(cs5535_event_clock);
189191
printk(KERN_ERR DRV_NAME ": Unable to set up the MFGPT clock source\n");
190192
return -EIO;
191193
}

0 commit comments

Comments
 (0)