From 61b65a394cdbf5ed9117ad0da184a3f90a9b914a Mon Sep 17 00:00:00 2001 From: Phong Tran Date: Tue, 9 Jun 2015 20:28:18 +0700 Subject: [PATCH] greybus: uart: remove the redundant unregister chrdev The unregister_chrdev_region() does twice here. The chrdev region was unregistered inside tty_unregister_driver(). Signed-off-by: Phong Tran Reviewed-by: Alex Elder Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/uart.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c index 6db49930cf40..7e94632a581b 100644 --- a/drivers/staging/greybus/uart.c +++ b/drivers/staging/greybus/uart.c @@ -732,12 +732,8 @@ fail_unregister_dev: static void gb_tty_exit(void) { - int major = MAJOR(gb_tty_driver->major); - int minor = gb_tty_driver->minor_start; - tty_unregister_driver(gb_tty_driver); put_tty_driver(gb_tty_driver); - unregister_chrdev_region(MKDEV(major, minor), GB_NUM_MINORS); } static struct gb_protocol uart_protocol = { -- 2.39.5