From: Rolf Eike Beer Date: Sun, 27 Aug 2006 08:23:27 +0000 (-0700) Subject: [PATCH] tty: remove bogus call to cdev_del() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=cc36e7f124da139a819ad316c39d9dbcb5ba1897;p=openwrt%2Fstaging%2Fblogic.git [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 Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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;