diff options
-rw-r--r-- | arch/um/drivers/chan_kern.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c index 6e51424745ab..25e1965df7ce 100644 --- a/arch/um/drivers/chan_kern.c +++ b/arch/um/drivers/chan_kern.c | |||
@@ -210,9 +210,9 @@ void free_irqs(void) | |||
210 | list_for_each(ele, &list) { | 210 | list_for_each(ele, &list) { |
211 | chan = list_entry(ele, struct chan, free_list); | 211 | chan = list_entry(ele, struct chan, free_list); |
212 | 212 | ||
213 | if (chan->input) | 213 | if (chan->input && chan->enabled) |
214 | free_irq(chan->line->driver->read_irq, chan); | 214 | free_irq(chan->line->driver->read_irq, chan); |
215 | if (chan->output) | 215 | if (chan->output && chan->enabled) |
216 | free_irq(chan->line->driver->write_irq, chan); | 216 | free_irq(chan->line->driver->write_irq, chan); |
217 | chan->enabled = 0; | 217 | chan->enabled = 0; |
218 | } | 218 | } |
@@ -231,9 +231,9 @@ static void close_one_chan(struct chan *chan, int delay_free_irq) | |||
231 | spin_unlock_irqrestore(&irqs_to_free_lock, flags); | 231 | spin_unlock_irqrestore(&irqs_to_free_lock, flags); |
232 | } | 232 | } |
233 | else { | 233 | else { |
234 | if (chan->input) | 234 | if (chan->input && chan->enabled) |
235 | free_irq(chan->line->driver->read_irq, chan); | 235 | free_irq(chan->line->driver->read_irq, chan); |
236 | if (chan->output) | 236 | if (chan->output && chan->enabled) |
237 | free_irq(chan->line->driver->write_irq, chan); | 237 | free_irq(chan->line->driver->write_irq, chan); |
238 | chan->enabled = 0; | 238 | chan->enabled = 0; |
239 | } | 239 | } |