The patch titled char: mxser_new, check request_region retvals has been added to the -mm tree. Its filename is char-mxser_new-check-request_region-retvals.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: char: mxser_new, check request_region retvals From: Jiri Slaby <jirislaby@xxxxxxxxx> mxser_new, check request_region retvals Return values of (pci_)request_region should be checked and error should be returned if something is in bad state. Signed-off-by: Jiri Slaby <jirislaby@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/char/mxser_new.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff -puN drivers/char/mxser_new.c~char-mxser_new-check-request_region-retvals drivers/char/mxser_new.c --- a/drivers/char/mxser_new.c~char-mxser_new-check-request_region-retvals +++ a/drivers/char/mxser_new.c @@ -622,19 +622,24 @@ static int __init mxser_get_PCI_conf(int { unsigned int i, j; unsigned long ioaddress; + int retval; /* io address */ brd->board_type = board_type; brd->nports = mxser_numports[board_type - 1]; ioaddress = pci_resource_start(pdev, 2); - pci_request_region(pdev, 2, "mxser(IO)"); + retval = pci_request_region(pdev, 2, "mxser(IO)"); + if (retval) + goto err; for (i = 0; i < brd->nports; i++) brd->ports[i].ioaddr = ioaddress + 8 * i; /* vector */ ioaddress = pci_resource_start(pdev, 3); - pci_request_region(pdev, 3, "mxser(vector)"); + retval = pci_request_region(pdev, 3, "mxser(vector)"); + if (retval) + goto err_relio; brd->vector = ioaddress; /* irq */ @@ -674,6 +679,10 @@ static int __init mxser_get_PCI_conf(int brd->ports[i].baud_base = 921600; } return 0; +err_relio: + pci_release_region(pdev, 2); +err: + return retval; } static int __init mxser_init(void) @@ -3009,8 +3018,12 @@ static int __init mxser_get_ISA_conf(int brd->nports = 8; else brd->nports = 4; - request_region(brd->ports[0].ioaddr, 8 * brd->nports, "mxser(IO)"); - request_region(brd->vector, 1, "mxser(vector)"); + if (!request_region(brd->ports[0].ioaddr, 8 * brd->nports, "mxser(IO)")) + return MXSER_ERR_IOADDR; + if (!request_region(brd->vector, 1, "mxser(vector)")) { + release_region(brd->ports[0].ioaddr, 8 * brd->nports); + return MXSER_ERR_VECTOR; + } return brd->nports; } _ Patches currently in -mm which might be from jirislaby@xxxxxxxxx are origin.patch git-watchdog.patch pci-mxser-pci-refcounts.patch mxser-make-an-experimental-clone.patch char-mxser_new-correct-include-file.patch char-mxser_new-upgrade-to-191.patch char-mxser_new-rework-to-allow-dynamic-structs.patch char-mxser_new-kill-unneeded-memsets.patch char-mxser_new-use-__devinit-macros.patch char-mxser_new-pci_request_region-for-pci-regions.patch char-mxser_new-check-request_region-retvals.patch hisax-niccy-cleanup.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html