diff options
Diffstat (limited to 'drivers/char/stallion.c')
-rw-r--r-- | drivers/char/stallion.c | 7 |
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) | |||
4753 | brdp->ioaddr2 = conf.ioaddr2; | 4753 | brdp->ioaddr2 = conf.ioaddr2; |
4754 | brdp->irq = conf.irq; | 4754 | brdp->irq = conf.irq; |
4755 | brdp->irqtype = conf.irqtype; | 4755 | brdp->irqtype = conf.irqtype; |
4756 | if (stl_brdinit(brdp)) | 4756 | stl_brds[brdp->brdnr] = brdp; |
4757 | if (stl_brdinit(brdp)) { | ||
4758 | stl_brds[brdp->brdnr] = NULL; | ||
4757 | kfree(brdp); | 4759 | kfree(brdp); |
4758 | else { | 4760 | } else { |
4759 | for (j = 0; j < brdp->nrports; j++) | 4761 | for (j = 0; j < brdp->nrports; j++) |
4760 | tty_register_device(stl_serial, | 4762 | tty_register_device(stl_serial, |
4761 | brdp->brdnr * STL_MAXPORTS + j, NULL); | 4763 | brdp->brdnr * STL_MAXPORTS + j, NULL); |
4762 | stl_brds[brdp->brdnr] = brdp; | ||
4763 | stl_nrbrds = i + 1; | 4764 | stl_nrbrds = i + 1; |
4764 | } | 4765 | } |
4765 | } | 4766 | } |