diff options
Diffstat (limited to 'drivers/char/epca.c')
-rw-r--r-- | drivers/char/epca.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/char/epca.c b/drivers/char/epca.c index 3baa2ab8cbd4..c3f95583a120 100644 --- a/drivers/char/epca.c +++ b/drivers/char/epca.c | |||
@@ -1113,11 +1113,8 @@ static void __exit epca_module_exit(void) | |||
1113 | ch = card_ptr[crd]; | 1113 | ch = card_ptr[crd]; |
1114 | for (count = 0; count < bd->numports; count++, ch++) | 1114 | for (count = 0; count < bd->numports; count++, ch++) |
1115 | { /* Begin for each port */ | 1115 | { /* Begin for each port */ |
1116 | if (ch) { | 1116 | if (ch && ch->tty) |
1117 | if (ch->tty) | 1117 | tty_hangup(ch->tty); |
1118 | tty_hangup(ch->tty); | ||
1119 | kfree(ch->tmp_buf); | ||
1120 | } | ||
1121 | } /* End for each port */ | 1118 | } /* End for each port */ |
1122 | } /* End for each card */ | 1119 | } /* End for each card */ |
1123 | pci_unregister_driver (&epca_driver); | 1120 | pci_unregister_driver (&epca_driver); |
@@ -1635,16 +1632,6 @@ static void post_fep_init(unsigned int crd) | |||
1635 | init_waitqueue_head(&ch->close_wait); | 1632 | init_waitqueue_head(&ch->close_wait); |
1636 | 1633 | ||
1637 | spin_unlock_irqrestore(&epca_lock, flags); | 1634 | spin_unlock_irqrestore(&epca_lock, flags); |
1638 | |||
1639 | ch->tmp_buf = kmalloc(ch->txbufsize,GFP_KERNEL); | ||
1640 | if (!ch->tmp_buf) { | ||
1641 | printk(KERN_ERR "POST FEP INIT : kmalloc failed for port 0x%x\n",i); | ||
1642 | release_region((int)bd->port, 4); | ||
1643 | while(i-- > 0) | ||
1644 | kfree((ch--)->tmp_buf); | ||
1645 | return; | ||
1646 | } else | ||
1647 | memset((void *)ch->tmp_buf,0,ch->txbufsize); | ||
1648 | } /* End for each port */ | 1635 | } /* End for each port */ |
1649 | 1636 | ||
1650 | printk(KERN_INFO | 1637 | printk(KERN_INFO |