virtio: console: fix error handling in init() function
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 <a9985f635ca4eb5d7c64df6d16c76aa9811509c5@ispras.ru>
Acked-by: Amit Shah <c7a04b2314b75cab042d4753bd03a193bc8ee50d@redhat.com>
Signed-off-by: Rusty Russell <df9728c9e5104131c08c7adb03af425394842596@rustcorp.com.au>

KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas