diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-07 02:25:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-07 02:25:20 +0000 |
commit | 8372e24aca862ae1fdd54a442fba92dc9b4b6161 (patch) | |
tree | 5fb60c5cd3d6bb6496650d1605a3c51d09be2bf1 /drivers/virtio/virtio.c | |
parent | Adding debian version 6.1.85-1. (diff) | |
download | linux-8372e24aca862ae1fdd54a442fba92dc9b4b6161.tar.xz linux-8372e24aca862ae1fdd54a442fba92dc9b4b6161.zip |
Merging upstream version 6.1.90.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/virtio/virtio.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 828ced060..1ef094427 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -489,13 +489,19 @@ EXPORT_SYMBOL_GPL(unregister_virtio_device); int virtio_device_freeze(struct virtio_device *dev) { struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); + int ret; virtio_config_disable(dev); dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED; - if (drv && drv->freeze) - return drv->freeze(dev); + if (drv && drv->freeze) { + ret = drv->freeze(dev); + if (ret) { + virtio_config_enable(dev); + return ret; + } + } return 0; } |