Skip to content

Commit

Permalink
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed May 20, 2010
2 parents 6fa0fdd + fdb19a6 commit 5bfec46
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/clocksource/cs5535-clockevt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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;
}
Expand Down

0 comments on commit 5bfec46

Please sign in to comment.