Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b08b5ad9 authored by Ingo Korb's avatar Ingo Korb Committed by Linus Torvalds
Browse files

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: default avatarIngo Korb <ml@akana.de>
Acked-by: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 58ed2f9c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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;
		}
	}