mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Reviewed-by: Jean Delvare <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
f4f653e987
commit
7d1c2858c4
1 changed files with 0 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue