summaryrefslogtreecommitdiffstats
path: root/drivers/char/tty_io.c
diff options
context:
space:
mode:
authorRolf Eike Beer <eike-kernel@sf-tec.de>2006-08-27 01:23:27 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-08-27 11:01:28 -0700
commitcc36e7f124da139a819ad316c39d9dbcb5ba1897 (patch)
tree869cec3385a820bfc7b286c9bdc91fa47d4ada22 /drivers/char/tty_io.c
parent641741e010b615bae417c876a21d17dbd616241f (diff)
downloadblackbird-op-linux-cc36e7f124da139a819ad316c39d9dbcb5ba1897.tar.gz
blackbird-op-linux-cc36e7f124da139a819ad316c39d9dbcb5ba1897.zip
[PATCH] tty: remove bogus call to cdev_del()
When cdev_add() failed there is no reason to call cdev_del(). Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r--drivers/char/tty_io.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index bfdb90242a90..d6e4eaa48538 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3094,7 +3094,6 @@ int tty_register_driver(struct tty_driver *driver)
driver->cdev.owner = driver->owner;
error = cdev_add(&driver->cdev, dev, driver->num);
if (error) {
- cdev_del(&driver->cdev);
unregister_chrdev_region(dev, driver->num);
driver->ttys = NULL;
driver->termios = driver->termios_locked = NULL;
OpenPOWER on IntegriCloud