mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Char: stallion, fix oops during init with ISA cards
@ 2007-06-15 18:02 Ingo Korb
  2007-06-15 19:35 ` [PATCH 1/1] " Jiri Slaby
  0 siblings, 1 reply; 2+ messages in thread
From: Ingo Korb @ 2007-06-15 18:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Slaby

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>
---
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;
 		}
 	}


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] Char: stallion, fix oops during init with ISA cards
  2007-06-15 18:02 [PATCH] Char: stallion, fix oops during init with ISA cards Ingo Korb
@ 2007-06-15 19:35 ` Jiri Slaby
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2007-06-15 19:35 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Ingo Korb

Thanks, seems good to me. Next time, feel free Cc Andrew directly.

--

From: Ingo Korb <ml@akana.de>

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>
---
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;
 		}
 	}


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-15 19:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-15 18:02 [PATCH] Char: stallion, fix oops during init with ISA cards Ingo Korb
2007-06-15 19:35 ` [PATCH 1/1] " Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®