Skip to content

Commit

Permalink
Char: stallion, fix oops during init with ISA cards
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ingo Korb authored and Linus Torvalds committed Jun 24, 2007
1 parent 58ed2f9 commit b08b5ad
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/char/stallion.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit b08b5ad

Please sign in to comment.