aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/synclink_gt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/synclink_gt.c')
-rw-r--r--drivers/tty/synclink_gt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c
index b38e954eedd..6e4c34011b7 100644
--- a/drivers/tty/synclink_gt.c
+++ b/drivers/tty/synclink_gt.c
@@ -3645,8 +3645,10 @@ static void device_init(int adapter_num, struct pci_dev *pdev)
3645 for (i=0; i < port_count; ++i) { 3645 for (i=0; i < port_count; ++i) {
3646 port_array[i] = alloc_dev(adapter_num, i, pdev); 3646 port_array[i] = alloc_dev(adapter_num, i, pdev);
3647 if (port_array[i] == NULL) { 3647 if (port_array[i] == NULL) {
3648 for (--i; i >= 0; --i) 3648 for (--i; i >= 0; --i) {
3649 tty_port_destroy(&port_array[i]->port);
3649 kfree(port_array[i]); 3650 kfree(port_array[i]);
3651 }
3650 return; 3652 return;
3651 } 3653 }
3652 } 3654 }
@@ -3773,6 +3775,7 @@ static void slgt_cleanup(void)
3773 release_resources(info); 3775 release_resources(info);
3774 tmp = info; 3776 tmp = info;
3775 info = info->next_device; 3777 info = info->next_device;
3778 tty_port_destroy(&tmp->port);
3776 kfree(tmp); 3779 kfree(tmp);
3777 } 3780 }
3778 3781