patch-2.1.68 linux/drivers/sound/dmabuf.c
Next file: linux/drivers/sound/lowlevel/awe_wave.c
Previous file: linux/drivers/sound/Makefile
Back to the patch index
Back to the overall index
- Lines: 15
- Date:
Sun Nov 30 10:30:18 1997
- Orig file:
v2.1.67/linux/drivers/sound/dmabuf.c
- Orig date:
Sat Nov 29 11:25:11 1997
diff -u --recursive --new-file v2.1.67/linux/drivers/sound/dmabuf.c linux/drivers/sound/dmabuf.c
@@ -1539,10 +1539,11 @@
{
/* This routine is called when driver is being unloaded */
#ifdef RUNTIME_DMA_ALLOC
- sound_free_dmap (dev, audio_devs[dev]->dmap_out,
- audio_devs[dev]->dmap_out->dma);
+ if (audio_devs[dev])
+ sound_free_dmap (dev, audio_devs[dev]->dmap_out,
+ audio_devs[dev]->dmap_out->dma);
- if (audio_devs[dev]->flags & DMA_DUPLEX)
+ if (audio_devs[dev] && audio_devs[dev]->flags & DMA_DUPLEX)
sound_free_dmap (dev, audio_devs[dev]->dmap_in,
audio_devs[dev]->dmap_in->dma);
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov