提交 b08b5ad9 编写于 作者: I Ingo Korb 提交者: Linus Torvalds

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: NIngo Korb <ml@akana.de>
Acked-by: NJiri Slaby <jirislaby@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 58ed2f9c
...@@ -4753,13 +4753,14 @@ static int __init stallion_module_init(void) ...@@ -4753,13 +4753,14 @@ static int __init stallion_module_init(void)
brdp->ioaddr2 = conf.ioaddr2; brdp->ioaddr2 = conf.ioaddr2;
brdp->irq = conf.irq; brdp->irq = conf.irq;
brdp->irqtype = conf.irqtype; brdp->irqtype = conf.irqtype;
if (stl_brdinit(brdp)) stl_brds[brdp->brdnr] = brdp;
if (stl_brdinit(brdp)) {
stl_brds[brdp->brdnr] = NULL;
kfree(brdp); kfree(brdp);
else { } else {
for (j = 0; j < brdp->nrports; j++) for (j = 0; j < brdp->nrports; j++)
tty_register_device(stl_serial, tty_register_device(stl_serial,
brdp->brdnr * STL_MAXPORTS + j, NULL); brdp->brdnr * STL_MAXPORTS + j, NULL);
stl_brds[brdp->brdnr] = brdp;
stl_nrbrds = i + 1; stl_nrbrds = i + 1;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册