virtio_console: Don't access uninitialized data.
[pandora-kernel.git] / drivers / char / virtio_console.c
index 8e3c46d..7795d1e 100644 (file)
@@ -1789,7 +1789,8 @@ static void virtcons_remove(struct virtio_device *vdev)
        /* Disable interrupts for vqs */
        vdev->config->reset(vdev);
        /* Finish up work that's lined up */
-       cancel_work_sync(&portdev->control_work);
+       if (use_multiport(portdev))
+               cancel_work_sync(&portdev->control_work);
 
        list_for_each_entry_safe(port, port2, &portdev->ports, list)
                unplug_port(port);