Commit cc36e7f1 authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Linus Torvalds

[PATCH] tty: remove bogus call to cdev_del()

When cdev_add() failed there is no reason to call cdev_del().
Signed-off-by: default avatarRolf Eike Beer <>
Cc: Alan Cox <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 641741e0
......@@ -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) {
unregister_chrdev_region(dev, driver->num);
driver->ttys = NULL;
driver->termios = driver->termios_locked = NULL;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment