> +
> iob_regs = map_onedev(iob_pdev, 0);
> + if (iob_regs == NULL)
> + printk(KERN_WARNING "pasemi_dma_init: Can't ioremap I/O Bridge
> registers\n");
>
> dma_pdev = pci_get_device(PCI_VENDOR_ID_PASEMI, 0xa007, NULL);
> if (!dma_pdev) {
> BUG();
Olof Johansson wrote:
> On Sat, Dec 13, 2008 at 05:45:41PM +0100, Roel Kluin wrote:
>> map_onedev can return NULL, so catch that. Also iounmap if DMA controller
>> can't be
>> found.
>> +
>> iob_regs = map_onedev(iob_pdev, 0);
>> +if (iob_regs == NULL) {
>> +BUG();
>> +
On Sat, Dec 13, 2008 at 05:45:41PM +0100, Roel Kluin wrote:
> map_onedev can return NULL, so catch that. Also iounmap if DMA controller
> can't be
> found.
>
> Signed-off-by: Roel Kluin
> ---
> UNTESTED! I am a bit new, so please confirm whether this is correct.
> especially:
>
> * can we iou
Roel Kluin wrote:
> map_onedev can return NULL, so catch that. Also iounmap if DMA controller
> can't be
> found.
I think there may also be a problem with pasemi_mac_init_module(): if
pci_register_driver() fails, then iob_regs won't get iounmapped.
maybe something like the totally untested patch
map_onedev can return NULL, so catch that. Also iounmap if DMA controller can't
be
found.
Signed-off-by: Roel Kluin
---
UNTESTED! I am a bit new, so please confirm whether this is correct.
especially:
* can we iounmap while init_lock is held?
* is it ok to add another BUG() here?
diff --git