Re: [PATCH] applicom: fix LEAK, unwind on errors;

From: Andrew Morton
Date: Fri Oct 03 2003 - 19:01:38 EST


"Randy.Dunlap" <rddunlap@xxxxxxxx> wrote:
>
> -#warning "LEAK"
> - RamIO = ioremap(mem, LEN_RAM_IO * MAX_ISA_BOARD);
> + maxRamIO = ioremap(mem, LEN_RAM_IO * MAX_ISA_BOARD);
>
> - if (!RamIO)
> + if (!maxRamIO)
> printk(KERN_INFO "ac.o: Failed to ioremap ISA memory space at 0x%lx\n", mem);


It seems that this driver is just testing to see if it can ioremap the
whole region before going through and mapping each board.

If we want to keep this sanity check then the iounmap should come
immediately after the ioremap, or it should just be removed.

Probably the latter: if the individual ioremaps work then they've worked,
haven't they?


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/