]> git.baikalelectronics.ru Git - kernel.git/commit
tty: ehv_bytechan: clean up init error handling
authorJohan Hovold <johan@kernel.org>
Wed, 26 Apr 2017 10:30:04 +0000 (12:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 May 2017 14:43:55 +0000 (16:43 +0200)
commit369d1803178c973b81b214496d8ec4e3892695f1
treec3a2a3296511e46507a1431088bca3113e21cee5
parent19c971b9367629e66b63c897df3e4896a20ec12a
tty: ehv_bytechan: clean up init error handling

Straighten out the initcall error handling to avoid deregistering a
never-registered tty driver (something which would lead to a
NULL-pointer dereference) in the most unlikely event that driver
registration fails (e.g. we've run out of major numbers).

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/ehv_bytechan.c