virtio_console: fix uninitialized variable use
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 29 Mar 2017 20:22:04 +0000 (23:22 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Nov 2019 17:29:04 +0000 (18:29 +0100)
commit20e9c1101260dfbe3e169a259591408ccab61c22
treee3f9b24e6130c64f6b75f623e4a2805df4478134
parent535b31d0e596394b05ab75dda00816bd1a109c11
virtio_console: fix uninitialized variable use

[ Upstream commit 2055997f983c6db7b5c3940ce5f8f822657d5bc3 ]

We try to disable callbacks on c_ivq even without multiport
even though that vq is not initialized in this configuration.

Fixes: c743d09dbd01 ("virtio: console: Disable callbacks for virtqueues at start of S4 freeze")
Suggested-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/char/virtio_console.c