diff options
Diffstat (limited to 'drivers/ipack/devices/ipoctal.c')
-rw-r--r-- | drivers/ipack/devices/ipoctal.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipoctal.c index c06ab396e84f..576d53d92677 100644 --- a/drivers/ipack/devices/ipoctal.c +++ b/drivers/ipack/devices/ipoctal.c | |||
@@ -415,6 +415,7 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr, | |||
415 | tty_dev = tty_port_register_device(&channel->tty_port, tty, i, NULL); | 415 | tty_dev = tty_port_register_device(&channel->tty_port, tty, i, NULL); |
416 | if (IS_ERR(tty_dev)) { | 416 | if (IS_ERR(tty_dev)) { |
417 | dev_err(&ipoctal->dev->dev, "Failed to register tty device.\n"); | 417 | dev_err(&ipoctal->dev->dev, "Failed to register tty device.\n"); |
418 | tty_port_destroy(&channel->tty_port); | ||
418 | continue; | 419 | continue; |
419 | } | 420 | } |
420 | dev_set_drvdata(tty_dev, channel); | 421 | dev_set_drvdata(tty_dev, channel); |
@@ -700,6 +701,7 @@ static void __ipoctal_remove(struct ipoctal *ipoctal) | |||
700 | struct ipoctal_channel *channel = &ipoctal->channel[i]; | 701 | struct ipoctal_channel *channel = &ipoctal->channel[i]; |
701 | tty_unregister_device(ipoctal->tty_drv, i); | 702 | tty_unregister_device(ipoctal->tty_drv, i); |
702 | tty_port_free_xmit_buf(&channel->tty_port); | 703 | tty_port_free_xmit_buf(&channel->tty_port); |
704 | tty_port_destroy(&channel->tty_port); | ||
703 | } | 705 | } |
704 | 706 | ||
705 | tty_unregister_driver(ipoctal->tty_drv); | 707 | tty_unregister_driver(ipoctal->tty_drv); |