staging: dgap: remove unneeded kfree() for ttys in tty_driver
authorDaeseok Youn <daeseok.youn@gmail.com>
Mon, 26 May 2014 10:23:01 +0000 (19:23 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 May 2014 17:35:24 +0000 (10:35 -0700)
In destruct_tty_driver() from put_tty_driver() will free the
ttys in tty_driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c

index 1475532b4df02566b80b024c5f39d9d29c44f4b8..60b7d700b07d11a55dfda39b3172c657c16c66f1 100644 (file)
@@ -1503,8 +1503,6 @@ static void dgap_tty_uninit(struct board_t *brd)
                        tty_unregister_device(brd->serial_driver, i);
                }
                tty_unregister_driver(brd->serial_driver);
-               kfree(brd->serial_driver->ttys);
-               brd->serial_driver->ttys = NULL;
                put_tty_driver(brd->serial_driver);
                kfree(brd->serial_ports);
                brd->dgap_major_serial_registered = FALSE;
@@ -1520,8 +1518,6 @@ static void dgap_tty_uninit(struct board_t *brd)
                        tty_unregister_device(brd->print_driver, i);
                }
                tty_unregister_driver(brd->print_driver);
-               kfree(brd->print_driver->ttys);
-               brd->print_driver->ttys = NULL;
                put_tty_driver(brd->print_driver);
                kfree(brd->printer_ports);
                brd->dgap_major_transparent_print_registered = FALSE;