diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-04-02 14:45:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-16 14:21:06 -0700 |
commit | 7d1c2858c49095ab748f55354b89dbd6b18d28b9 (patch) | |
tree | 7775cf89d57cb642315ec515cb1111c56c6b08c7 /drivers/char/ttyprintk.c | |
parent | f4f653e9875e573860e783fecbebde284a8626f5 (diff) |
ttyprintk: Fix wrong tty_unregister_driver() call in the error path
ttyprintk driver calls tty_unregister_driver() wrongly in the error
path of tty_register_driver(). Also, setting ttyprintk_driver to NULL
is utterly superfluous, so let's get rid of it, too.
Reported-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/ttyprintk.c')
-rw-r--r-- | drivers/char/ttyprintk.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c index daea84c4174..2a39c579036 100644 --- a/drivers/char/ttyprintk.c +++ b/drivers/char/ttyprintk.c @@ -210,10 +210,8 @@ static int __init ttyprintk_init(void) return 0; error: - tty_unregister_driver(ttyprintk_driver); put_tty_driver(ttyprintk_driver); tty_port_destroy(&tpk_port.port); - ttyprintk_driver = NULL; return ret; } device_initcall(ttyprintk_init); |