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.
Change-Id: I78957cef2b45c66eab1d949a04ccbaffe10499e7
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Fixes: 5f6c7e0831
("vfio/platform: Use the new device life cycle helpers")
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20230131083349.2027189-1-tduszynski@marvell.com
Git-commit: 168a9c91fe0a1180959b6394f4566de7080244b6
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Yimin Peng <quic_yiminp@quicinc.com>
This commit is contained in:
parent
ef7d5d5c5c
commit
db636b8ec0
@ -650,10 +650,13 @@ int vfio_platform_init_common(struct vfio_platform_device *vdev)
|
||||
mutex_init(&vdev->igate);
|
||||
|
||||
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",
|
||||
vdev->name);
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(vfio_platform_init_common);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user