From: Rolf Eike Beer 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 --- drivers/char/tty_io.c | 1 - 1 files changed, 1 deletion(-) diff -puN drivers/char/tty_io.c~tty-remove-bogus-call-to-cdev_del drivers/char/tty_io.c --- a/drivers/char/tty_io.c~tty-remove-bogus-call-to-cdev_del +++ a/drivers/char/tty_io.c @@ -3094,7 +3094,6 @@ int tty_register_driver(struct tty_drive 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; _