Re: [PATCH] [POWERPC] pasemi: ioremap/iounmap balance and failure handling

2009-01-06 Thread Benjamin Herrenschmidt
> + > 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();

Re: [PATCH] [POWERPC] pasemi: ioremap/iounmap balance and failure handling

2008-12-16 Thread Roel Kluin
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(); >> +

Re: [PATCH] [POWERPC] pasemi: ioremap/iounmap balance and failure handling

2008-12-13 Thread Olof Johansson
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

Re: [PATCH] [POWERPC] pasemi: ioremap/iounmap balance and failure handling

2008-12-13 Thread Roel Kluin
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

[PATCH] [POWERPC] pasemi: ioremap/iounmap balance and failure handling

2008-12-13 Thread Roel Kluin
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