]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] fix oops in emu10k1_wavein_open() error recovery
authorAndrew Morton <akpm@osdl.org>
Sat, 6 Mar 2004 16:50:53 +0000 (08:50 -0800)
committerJaroslav Kysela <perex@suse.cz>
Sat, 6 Mar 2004 16:50:53 +0000 (08:50 -0800)
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.

sound/oss/emu10k1/cardwi.c

index 552d2112509fa06808a2cedbafe941e1df707cee..ce6f698f85fd4a3899bb47fb17f7b36b4ab7ad4c 100644 (file)
@@ -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;
        }