Commit 168a9c91 authored by Tomasz Duszynski's avatar Tomasz Duszynski Committed by Alex Williamson

vfio: platform: ignore missing reset if disabled at module init

If reset requirement was relaxed via module parameter, errors caused by
missing reset should not be propagated down to the vfio core.
Otherwise initialization will fail.
Signed-off-by: default avatarTomasz Duszynski <tduszynski@marvell.com>
Fixes: 5f6c7e08 ("vfio/platform: Use the new device life cycle helpers")
Reviewed-by: default avatarKevin Tian <kevin.tian@intel.com>
Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20230131083349.2027189-1-tduszynski@marvell.comSigned-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent f4f0c25e
...@@ -647,10 +647,13 @@ int vfio_platform_init_common(struct vfio_platform_device *vdev) ...@@ -647,10 +647,13 @@ int vfio_platform_init_common(struct vfio_platform_device *vdev)
mutex_init(&vdev->igate); mutex_init(&vdev->igate);
ret = vfio_platform_get_reset(vdev); ret = vfio_platform_get_reset(vdev);
if (ret && vdev->reset_required) if (ret && vdev->reset_required) {
dev_err(dev, "No reset function found for device %s\n", dev_err(dev, "No reset function found for device %s\n",
vdev->name); vdev->name);
return ret; return ret;
}
return 0;
} }
EXPORT_SYMBOL_GPL(vfio_platform_init_common); EXPORT_SYMBOL_GPL(vfio_platform_init_common);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment