[PATCH] tty: remove bogus call to cdev_del()
authorRolf Eike Beer <eike-kernel@sf-tec.de>
Sun, 27 Aug 2006 08:23:27 +0000 (01:23 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 27 Aug 2006 18:01:28 +0000 (11:01 -0700)
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>
drivers/char/tty_io.c

index bfdb90242a905749021bc93a801cb543e969852c..d6e4eaa4853829c3c9fdacea4f797bd9c14c57a7 100644 (file)
@@ -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;