summaryrefslogtreecommitdiffstats
path: root/drivers/char/stallion.c
diff options
context:
space:
mode:
authorIngo Korb <ml@akana.de>2007-06-24 02:16:35 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-24 17:59:11 +0200
commitb08b5ad9473a972fdd5d739080d24a84b23525ac (patch)
treedb01992344f5f8cfe3422fdb69ebc0f7eeb88813 /drivers/char/stallion.c
parentalpha: fix alignment problem in csum_ipv6_magic() (diff)
downloadlinux-b08b5ad9473a972fdd5d739080d24a84b23525ac.tar.xz
linux-b08b5ad9473a972fdd5d739080d24a84b23525ac.zip
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@akana.de> Acked-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/stallion.c')
-rw-r--r--drivers/char/stallion.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index 45bf2a262a85..8c73ccb8830f 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;
}
}