Can someone with an ad1848 please test this trivial patch? Preferably
test that loading the module the second time works fine?
Thanks!
Rusty.
-- Anyone who quotes me in their sig is an idiot. -- Rusty Russell.===== drivers/sound/ad1848.c 1.8 vs edited ===== --- 1.8/drivers/sound/ad1848.c Fri May 10 01:40:52 2002 +++ edited/drivers/sound/ad1848.c Sun Jul 14 18:21:20 2002 @@ -1997,7 +1997,8 @@ sprintf(dev_name, "Generic audio codec (%s)", devc->chip_name); - request_region(devc->base, 4, devc->name); + if (!request_region(devc->base, 4, devc->name)) + return -1; conf_printf2(dev_name, devc->base, devc->irq, dma_playback, dma_capture); @@ -2013,8 +2014,10 @@ } portc = (ad1848_port_info *) kmalloc(sizeof(ad1848_port_info), GFP_KERNEL); - if(portc==NULL) + if(portc==NULL) { + release_region(devc->base, 4); return -1; + } if ((my_dev = sound_install_audiodrv(AUDIO_DRIVER_VERSION, dev_name, @@ -2026,8 +2029,8 @@ dma_playback, dma_capture)) < 0) { + release_region(devc->base, 4); kfree(portc); - portc=NULL; return -1; }
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/