diff options
-rw-r--r-- | drivers/tty/vcc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c index 9ffd42e333b8..a4388a8d6bc7 100644 --- a/drivers/tty/vcc.c +++ b/drivers/tty/vcc.c @@ -695,12 +695,9 @@ static int vcc_remove(struct vio_dev *vdev) tty_vhangup(port->tty); /* Get exclusive reference to VCC, ensures that there are no other - * clients to this port + * clients to this port. This cannot fail. */ - port = vcc_get(port->index, true); - - if (WARN_ON(!port)) - return -ENODEV; + vcc_get(port->index, true); tty_unregister_device(vcc_tty_driver, port->index); |