]> git.karo-electronics.de Git - karo-tx-linux.git/commit
virtio: console: fix error handling in init() function
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Sat, 1 Sep 2012 19:49:37 +0000 (23:49 +0400)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 20 Sep 2012 00:14:52 +0000 (10:14 +1000)
commitcbdc38cd8b28a5a2fe97da94301aaf664bfd906c
treef9a5589e5f56431a9bae185df364ebf9c92cc057
parent431f7060ee37aba030a29c4b0ee567d977525d4e
virtio: console: fix error handling in init() function

If register_virtio_driver() fails, virtio-ports class is not destroyed.
The patch adds error handling of register_virtio_driver().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/virtio_console.c