[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <utzt99jv9.fsf@dragon.akana.de>
Date: Fri, 15 Jun 2007 20:02:18 +0200
From: Ingo Korb <ml@...na.de>
To: linux-kernel@...r.kernel.org
CC: Jiri Slaby <jirislaby@...il.com>
Subject: [PATCH] Char: stallion, fix oops during init with ISA cards
The stallion driver oopses while initializing ISA cards due to an
uninitialized variable. This patch changes the initialisation order to
match the PCI code path.
Signed-off-by: Ingo Korb <ml@...na.de>
---
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index 45bf2a2..8c73ccb 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -4753,13 +4753,14 @@ static int __init stallion_module_init(void)
brdp->ioaddr2 = conf.ioaddr2;
brdp->irq = conf.irq;
brdp->irqtype = conf.irqtype;
- if (stl_brdinit(brdp))
+ stl_brds[brdp->brdnr] = brdp;
+ if (stl_brdinit(brdp)) {
+ stl_brds[brdp->brdnr] = NULL;
kfree(brdp);
- else {
+ } else {
for (j = 0; j < brdp->nrports; j++)
tty_register_device(stl_serial,
brdp->brdnr * STL_MAXPORTS + j, NULL);
- stl_brds[brdp->brdnr] = brdp;
stl_nrbrds = i + 1;
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists