Commit 5bfec46baa3a752393433b8d89d3b2c70820f61d
Exists in
master
and in
39 other branches
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kern…
…el/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
Showing 1 changed file Side-by-side Diff
drivers/clocksource/cs5535-clockevt.c
... | ... | @@ -154,14 +154,14 @@ |
154 | 154 | if (cs5535_mfgpt_setup_irq(timer, MFGPT_CMP2, &timer_irq)) { |
155 | 155 | printk(KERN_ERR DRV_NAME ": Could not set up IRQ %d\n", |
156 | 156 | timer_irq); |
157 | - return -EIO; | |
157 | + goto err_timer; | |
158 | 158 | } |
159 | 159 | |
160 | 160 | /* And register it with the kernel */ |
161 | 161 | ret = setup_irq(timer_irq, &mfgptirq); |
162 | 162 | if (ret) { |
163 | 163 | printk(KERN_ERR DRV_NAME ": Unable to set up the interrupt.\n"); |
164 | - goto err; | |
164 | + goto err_irq; | |
165 | 165 | } |
166 | 166 | |
167 | 167 | /* Set the clock scale and enable the event mode for CMP2 */ |
168 | 168 | |
... | ... | @@ -184,8 +184,10 @@ |
184 | 184 | |
185 | 185 | return 0; |
186 | 186 | |
187 | -err: | |
187 | +err_irq: | |
188 | 188 | cs5535_mfgpt_release_irq(cs5535_event_clock, MFGPT_CMP2, &timer_irq); |
189 | +err_timer: | |
190 | + cs5535_mfgpt_free_timer(cs5535_event_clock); | |
189 | 191 | printk(KERN_ERR DRV_NAME ": Unable to set up the MFGPT clock source\n"); |
190 | 192 | return -EIO; |
191 | 193 | } |