ttyprintk: Fix wrong tty_unregister_driver() call in the error path
authorTakashi Iwai <tiwai@suse.de>
Wed, 2 Apr 2014 12:45:21 +0000 (14:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Apr 2014 21:21:06 +0000 (14:21 -0700)
commit7d1c2858c49095ab748f55354b89dbd6b18d28b9
tree7775cf89d57cb642315ec515cb1111c56c6b08c7
parentf4f653e9875e573860e783fecbebde284a8626f5
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>
drivers/char/ttyprintk.c