Commit 1cd4dae0 authored by Andrew Morton's avatar Andrew Morton Committed by Jaroslav Kysela

[PATCH] fix oops in emu10k1_wavein_open() error recovery

If a large pci_alloc_consistent() GFP_ATOMIC allocation fails this driver's
recovery code will call emu10k1_wavein_close() far earlier than it should: it
goes splat in emu10k1_timer_uninstall().

Fix it by simply removing that call: we haven't allocated any resources yet
anyway.

Note that one of the callers of emu10k1_wavein_open(), emu10k1_audio_read()
will sit there stupidly retrying the open.  But it has a sleep in there so
something might eventually give way.
parent 50d89de7
......@@ -164,7 +164,6 @@ int emu10k1_wavein_open(struct emu10k1_wavedevice *wave_dev)
if (alloc_buffer(card, &wiinst->buffer) < 0) {
ERROR();
emu10k1_wavein_close(wave_dev);
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment