summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-04-02 14:45:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-16 14:21:06 -0700
commit7d1c2858c49095ab748f55354b89dbd6b18d28b9 (patch)
tree7775cf89d57cb642315ec515cb1111c56c6b08c7 /drivers/char
parentf4f653e9875e573860e783fecbebde284a8626f5 (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')
-rw-r--r--drivers/char/ttyprintk.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c
index daea84c41743..2a39c5790364 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);